https://github.com/torvalds/linux
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
Tip revision: 60f583d56aa515b896a9d94f860f52640c1e8a75 authored by Dave Hansen on 07 March 2013, 16:31:51 UTC
x86: Do not try to sync identity map for non-mapped pages
x86: Do not try to sync identity map for non-mapped pages
Tip revision: 60f583d
File | Mode | Size |
---|---|---|
802 | ||
8021q | ||
9p | ||
appletalk | ||
atm | ||
ax25 | ||
batman-adv | ||
bluetooth | ||
bridge | ||
caif | ||
can | ||
ceph | ||
core | ||
dcb | ||
dccp | ||
decnet | ||
dns_resolver | ||
dsa | ||
ethernet | ||
ieee802154 | ||
ipv4 | ||
ipv6 | ||
ipx | ||
irda | ||
iucv | ||
key | ||
l2tp | ||
lapb | ||
llc | ||
mac80211 | ||
mac802154 | ||
netfilter | ||
netlabel | ||
netlink | ||
netrom | ||
nfc | ||
openvswitch | ||
packet | ||
phonet | ||
rds | ||
rfkill | ||
rose | ||
rxrpc | ||
sched | ||
sctp | ||
sunrpc | ||
tipc | ||
unix | ||
vmw_vsock | ||
wimax | ||
wireless | ||
x25 | ||
xfrm | ||
Kconfig | -rw-r--r-- | 10.9 KB |
Makefile | -rw-r--r-- | 2.0 KB |
compat.c | -rw-r--r-- | 24.6 KB |
nonet.c | -rw-r--r-- | 552 bytes |
socket.c | -rw-r--r-- | 83.3 KB |
sysctl_net.c | -rw-r--r-- | 2.8 KB |
Computing file changes ...