/[linux-patches]/genpatches-2.6/trunk/2.6.14/1490_16.Q_net-sk_wait_event-race-fix.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.14/1490_16.Q_net-sk_wait_event-race-fix.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 336 - (hide annotations) (download) (as text)
Mon Mar 20 15:24:17 2006 UTC (14 years, 8 months ago) by johnm
File MIME type: text/x-diff
File size: 931 byte(s)
Pushing race and overflow fix to svn
1 johnm 336 diff-tree 265a92856b17524c87da0258ac0d3cec80ae1d35 (from 6f5e6b9e69bf043074a0edabe3d271899c34eb79)
2     Author: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
3     Date: Fri Mar 17 16:05:43 2006 -0800
4    
5     [NET]: Fix race condition in sk_wait_event().
6    
7     It is broken, the condition is checked out of socket lock. It is
8     wonderful the bug survived for so long time.
9    
10     [ This fixes bugzilla #6233:
11     race condition in tcp_sendmsg when connection became established ]
12    
13     Signed-off-by: David S. Miller <davem@davemloft.net>
14    
15     diff --git a/include/net/sock.h b/include/net/sock.h
16     index 3075803..f63d0d5 100644
17     --- a/include/net/sock.h
18     +++ b/include/net/sock.h
19     @@ -478,9 +478,9 @@ static inline void sk_add_backlog(struct
20     rc = __condition; \
21     if (!rc) { \
22     *(__timeo) = schedule_timeout(*(__timeo)); \
23     - rc = __condition; \
24     } \
25     lock_sock(__sk); \
26     + rc = __condition; \
27     rc; \
28     })
29    

  ViewVC Help
Powered by ViewVC 1.1.20