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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Davide Libenzi <davidel@...>
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 - 10:50 am

On 06/26, Davide Libenzi wrote:

Yes, yes. I just meant you are right imho, we shouldn't add mb() into
add_wait_queue().

> But yeah, the problem in this case is the waitqueue_active() call. Without

This is subjective and thus up to maintainers, but personally I think you
are very, very right.

Perhaps we can add

void sock_poll_wait(struct file *file, struct sock *sk, poll_table *pt)
{
if (pt) {
poll_wait(file, sk->sk_sleep, pt);
/*
* fat comment
*/
smp_mb(); // or smp_mb__after_unlock();
}
}

Oleg.

--
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)