]> asedeno.scripts.mit.edu Git - linux.git/commit
parisc: Fix map_pages() to not overwrite existing pte entries
authorHelge Deller <deller@gmx.de>
Fri, 12 Oct 2018 20:37:46 +0000 (22:37 +0200)
committerHelge Deller <deller@gmx.de>
Wed, 17 Oct 2018 06:18:01 +0000 (08:18 +0200)
commit3c229b3f2dd8133f61bb81d3cb018be92f4bba39
treebff3ada8bcb9d2b031300f94f8a0a79874aee84e
parent4dd5b673fa625d647447ae4c477bf946ae877711
parisc: Fix map_pages() to not overwrite existing pte entries

Fix a long-existing small nasty bug in the map_pages() implementation which
leads to overwriting already written pte entries with zero, *if* map_pages() is
called a second time with an end address which isn't aligned on a pmd boundry.
This happens for example if we want to remap only the text segment read/write
in order to run alternative patching on the code. Exiting the loop when we
reach the end address fixes this.

Cc: stable@vger.kernel.org
Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/mm/init.c