Revision 60f583d56aa515b896a9d94f860f52640c1e8a75 authored by Dave Hansen on 07 March 2013, 16:31:51 UTC, committed by H. Peter Anvin on 07 March 2013, 21:23:28 UTC
kernel_map_sync_memtype() is called from a variety of contexts. The pat.c code that calls it seems to ensure that it is not called for non-ram areas by checking via pat_pagerange_is_ram(). It is important that it only be called on the actual identity map because there *IS* no map to sync for highmem pages, or for memory holes. The ioremap.c uses are not as careful as those from pat.c, and call kernel_map_sync_memtype() on PCI space which is in the middle of the kernel identity map _range_, but is not actually mapped. This patch adds a check to kernel_map_sync_memtype() which probably duplicates some of the checks already in pat.c. But, it is necessary for the ioremap.c uses and shouldn't hurt other callers. I have reproduced this bug and this patch fixes it for me and the original bug reporter: https://lkml.org/lkml/2013/2/5/396 Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com> Link: http://lkml.kernel.org/r/20130307163151.D9B58C4E@kernel.stglabs.ibm.com Signed-off-by: Dave Hansen <dave@sr71.net> Tested-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
1 parent 3c4aff6
File | Mode | Size |
---|---|---|
apparmor | ||
integrity | ||
keys | ||
selinux | ||
smack | ||
tomoyo | ||
yama | ||
Kconfig | -rw-r--r-- | 5.7 KB |
Makefile | -rw-r--r-- | 1.0 KB |
capability.c | -rw-r--r-- | 23.8 KB |
commoncap.c | -rw-r--r-- | 28.1 KB |
device_cgroup.c | -rw-r--r-- | 14.9 KB |
inode.c | -rw-r--r-- | 6.7 KB |
lsm_audit.c | -rw-r--r-- | 9.3 KB |
min_addr.c | -rw-r--r-- | 1.3 KB |
security.c | -rw-r--r-- | 35.1 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...