Re: [PATCH] net: fix race in the receive/select

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Oleg Nesterov <oleg@...>
Cc: Eric Dumazet <eric.dumazet@...>, Jiri Olsa <jolsa@...>, <netdev@...>, Linux Kernel Mailing List <linux-kernel@...>, <fbl@...>, <nhorman@...>, <davem@...>, Tejun Heo <htejun@...>
Date: Friday, June 26, 2009 - 1:32 pm

On Fri, 26 Jun 2009, Oleg Nesterov wrote:


Sure. The snippet above was just to show what typically the code does, not 
a suggestion on how to solve the socket case.
But yeah, the problem in this case is the waitqueue_active() call. Without 
that, the wait queue lock/unlock in poll_wait() and the one in wake_up() 
guarantees the necessary barriers.
Some might argue the costs of the lock/unlock of q->lock, and wonder if 
MBs are a more efficient solution. This is something I'm not going into.
To me, it just looked not right having cross-matching MB in different 
subsystems.



- Davide


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] net: fix race in the receive/select, Jiri Olsa, (Thu Jun 25, 8:25 am)
Re: [PATCH] net: fix race in the receive/select, Andi Kleen, (Mon Jun 29, 5:12 am)
Re: [PATCH] net: fix race in the receive/select, Herbert Xu, (Tue Jun 30, 11:39 pm)
Re: [PATCH] net: fix race in the receive/select, Andi Kleen, (Wed Jul 1, 2:27 am)
Re: [PATCH] net: fix race in the receive/select, Herbert Xu, (Wed Jul 1, 3:03 am)
Re: [PATCH] net: fix race in the receive/select, Andi Kleen, (Wed Jul 1, 3:22 am)
Re: [PATCH] net: fix race in the receive/select, Herbert Xu, (Wed Jul 1, 4:31 am)
Re: [PATCH] net: fix race in the receive/select, Jiri Olsa, (Wed Jul 1, 4:44 am)
Re: [PATCH] net: fix race in the receive/select, Herbert Xu, (Wed Jul 1, 6:58 am)
Re: [PATCH] net: fix race in the receive/select, Herbert Xu, (Wed Jul 1, 9:07 am)
Re: [PATCH] net: fix race in the receive/select, Zan Lynx, (Mon Jun 29, 12:59 pm)
Re: [PATCH] net: fix race in the receive/select, Andi Kleen, (Mon Jun 29, 1:29 pm)
Re: [PATCH] net: fix race in the receive/select, Jiri Olsa, (Mon Jun 29, 5:24 am)
Re: [PATCH] net: fix race in the receive/select, Tejun Heo, (Thu Jun 25, 9:50 pm)
Re: [PATCH] net: fix race in the receive/select, Eric Dumazet, (Thu Jun 25, 7:18 pm)
Re: [PATCH] net: fix race in the receive/select, Oleg Nesterov, (Thu Jun 25, 8:24 am)
Re: [PATCH] net: fix race in the receive/select, Davide Libenzi, (Thu Jun 25, 9:31 pm)
Re: [PATCH] net: fix race in the receive/select, Eric Dumazet, (Thu Jun 25, 9:59 pm)
Re: [PATCH] net: fix race in the receive/select, Davide Libenzi, (Thu Jun 25, 10:04 pm)
Re: [PATCH] net: fix race in the receive/select, Eric Dumazet, (Thu Jun 25, 10:19 pm)
Re: [PATCH] net: fix race in the receive/select, Oleg Nesterov, (Fri Jun 26, 9:46 am)
Re: [PATCH] net: fix race in the receive/select, Davide Libenzi, (Thu Jun 25, 11:14 pm)
Re: [PATCH] net: fix race in the receive/select, Oleg Nesterov, (Fri Jun 26, 9:57 am)
Re: [PATCH] net: fix race in the receive/select, Davide Libenzi, (Fri Jun 26, 1:32 pm)
Re: [PATCH] net: fix race in the receive/select, Oleg Nesterov, (Fri Jun 26, 10:50 am)
Re: [PATCH] net: fix race in the receive/select, Jarek Poplawski, (Sun Jun 28, 7:10 am)
Re: [PATCH] net: fix race in the receive/select, Jarek Poplawski, (Sun Jun 28, 7:22 am)
Re: [PATCH] net: fix race in the receive/select, Oleg Nesterov, (Sun Jun 28, 2:04 pm)
Re: [PATCH] net: fix race in the receive/select, Jarek Poplawski, (Sun Jun 28, 5:48 pm)
Re: [PATCH] net: fix race in the receive/select, Jiri Olsa, (Mon Jun 29, 5:27 am)
Re: [PATCH] net: fix race in the receive/select, Davide Libenzi, (Fri Jun 26, 2:12 pm)
Re: [PATCH] net: fix race in the receive/select, David Miller, (Fri Jun 26, 2:17 pm)
Re: [PATCH] net: fix race in the receive/select, Eric Dumazet, (Fri Jun 26, 3:35 pm)
Re: [PATCH] net: fix race in the receive/select, Jiri Olsa, (Mon Jun 29, 5:34 am)
Re: [PATCH] net: fix race in the receive/select, Jarek Poplawski, (Fri Jun 26, 1:42 am)
Re: [PATCH] net: fix race in the receive/select, Jarek Poplawski, (Fri Jun 26, 4:10 am)
Re: [PATCH] net: fix race in the receive/select, David Miller, (Thu Jun 25, 10:11 pm)