Revision 4ceb5db9757aaeadcf8fbbf97d76bd42aa4df0d6 authored by Linus Torvalds on 01 August 2005, 18:14:49 UTC, committed by Linus Torvalds on 01 August 2005, 18:14:49 UTC
There's no real guarantee that handle_mm_fault() will always be able to
break a COW situation - if an update from another thread ends up
modifying the page table some way, handle_mm_fault() may end up
requiring us to re-try the operation.

That's normally fine, but get_user_pages() ended up re-trying it as a
read, and thus a write access could in theory end up losing the dirty
bit or be done on a page that had not been properly COW'ed.

This makes get_user_pages() always retry write accesses as write
accesses by making "follow_page()" require that a writable follow has
the dirty bit set.  That simplifies the code and solves the race: if the
COW break fails for some reason, we'll just loop around and try again.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 8d894c4
History
File Mode Size
bluetooth
irda
sctp
tc_act
act_api.h -rw-r--r-- 3.2 KB
act_generic.h -rw-r--r-- 3.2 KB
addrconf.h -rw-r--r-- 6.5 KB
af_unix.h -rw-r--r-- 2.1 KB
ah.h -rw-r--r-- 793 bytes
arp.h -rw-r--r-- 1.0 KB
atmclip.h -rw-r--r-- 1.7 KB
ax25.h -rw-r--r-- 13.1 KB
checksum.h -rw-r--r-- 2.2 KB
compat.h -rw-r--r-- 1.2 KB
datalink.h -rw-r--r-- 461 bytes
dn.h -rw-r--r-- 7.5 KB
dn_dev.h -rw-r--r-- 7.0 KB
dn_fib.h -rw-r--r-- 5.5 KB
dn_neigh.h -rw-r--r-- 837 bytes
dn_nsp.h -rw-r--r-- 7.3 KB
dn_route.h -rw-r--r-- 4.2 KB
dsfield.h -rw-r--r-- 1.0 KB
dst.h -rw-r--r-- 5.9 KB
esp.h -rw-r--r-- 1.7 KB
flow.h -rw-r--r-- 1.8 KB
gen_stats.h -rw-r--r-- 1.5 KB
icmp.h -rw-r--r-- 1.7 KB
ieee80211.h -rw-r--r-- 24.1 KB
if_inet6.h -rw-r--r-- 6.3 KB
inet_common.h -rw-r--r-- 1.4 KB
inet_ecn.h -rw-r--r-- 2.4 KB
inetpeer.h -rw-r--r-- 1.7 KB
ip.h -rw-r--r-- 10.1 KB
ip6_checksum.h -rw-r--r-- 2.1 KB
ip6_fib.h -rw-r--r-- 4.0 KB
ip6_route.h -rw-r--r-- 3.9 KB
ip6_tunnel.h -rw-r--r-- 1.0 KB
ip_fib.h -rw-r--r-- 8.1 KB
ip_mp_alg.h -rw-r--r-- 2.5 KB
ip_vs.h -rw-r--r-- 29.7 KB
ipcomp.h -rw-r--r-- 159 bytes
ipconfig.h -rw-r--r-- 821 bytes
ipip.h -rw-r--r-- 1.3 KB
ipv6.h -rw-r--r-- 12.2 KB
ipx.h -rw-r--r-- 3.8 KB
iw_handler.h -rw-r--r-- 20.3 KB
lapb.h -rw-r--r-- 4.7 KB
llc.h -rw-r--r-- 2.8 KB
llc_c_ac.h -rw-r--r-- 10.1 KB
llc_c_ev.h -rw-r--r-- 11.6 KB
llc_c_st.h -rw-r--r-- 1.7 KB
llc_conn.h -rw-r--r-- 4.0 KB
llc_if.h -rw-r--r-- 3.1 KB
llc_pdu.h -rw-r--r-- 14.3 KB
llc_s_ac.h -rw-r--r-- 1.6 KB
llc_s_ev.h -rw-r--r-- 2.3 KB
llc_s_st.h -rw-r--r-- 941 bytes
llc_sap.h -rw-r--r-- 1.0 KB
ndisc.h -rw-r--r-- 2.8 KB
neighbour.h -rw-r--r-- 10.0 KB
netrom.h -rw-r--r-- 7.3 KB
p8022.h -rw-r--r-- 292 bytes
pkt_act.h -rw-r--r-- 5.2 KB
pkt_cls.h -rw-r--r-- 9.1 KB
pkt_sched.h -rw-r--r-- 6.5 KB
protocol.h -rw-r--r-- 3.2 KB
psnap.h -rw-r--r-- 267 bytes
raw.h -rw-r--r-- 1.3 KB
rawv6.h -rw-r--r-- 644 bytes
request_sock.h -rw-r--r-- 6.4 KB
rose.h -rw-r--r-- 7.7 KB
route.h -rw-r--r-- 5.3 KB
sch_generic.h -rw-r--r-- 7.4 KB
scm.h -rw-r--r-- 1.7 KB
slhc_vj.h -rw-r--r-- 6.6 KB
snmp.h -rw-r--r-- 4.0 KB
sock.h -rw-r--r-- 36.8 KB
syncppp.h -rw-r--r-- 3.5 KB
tcp.h -rw-r--r-- 50.9 KB
tcp_ecn.h -rw-r--r-- 3.2 KB
transp_v6.h -rw-r--r-- 1.1 KB
udp.h -rw-r--r-- 2.7 KB
x25.h -rw-r--r-- 8.3 KB
x25device.h -rw-r--r-- 338 bytes
xfrm.h -rw-r--r-- 25.3 KB

back to top