https://github.com/torvalds/linux
Revision 293ad60401da621b8b329abbe8c388edb25f658a authored by Octavian Purdila on 04 June 2008, 22:45:58 UTC, committed by David S. Miller on 04 June 2008, 22:45:58 UTC
skb_splice_bits temporary drops the socket lock while iterating over
the socket queue in order to break a reverse locking condition which
happens with sendfile. This, however, opens a window of opportunity
for tcp_collapse() to aggregate skbs and thus potentially free the
current skb used in skb_splice_bits and tcp_read_sock.

This patch fixes the problem by (re-)getting the same "logical skb"
after the lock has been temporary dropped.

Based on idea and initial patch from Evgeniy Polyakov.

Signed-off-by: Octavian Purdila <opurdila@ixiacom.com>
Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 26af65c
History
Tip revision: 293ad60401da621b8b329abbe8c388edb25f658a authored by Octavian Purdila on 04 June 2008, 22:45:58 UTC
tcp: Fix for race due to temporary drop of the socket lock in skb_splice_bits.
Tip revision: 293ad60
File Mode Size
Documentation
arch
block
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
usr
virt
.gitignore -rw-r--r-- 686 bytes
.mailmap -rw-r--r-- 3.6 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 90.5 KB
Kbuild -rw-r--r-- 2.4 KB
MAINTAINERS -rw-r--r-- 98.3 KB
Makefile -rw-r--r-- 53.8 KB
README -rw-r--r-- 16.5 KB
REPORTING-BUGS -rw-r--r-- 3.1 KB

README

back to top