Re: [RFC] tcp: race in receive part

From: Eric Dumazet
Date: Thu Jun 25 2009 - 06:47:34 EST


Eric Dumazet a Ãcrit :
> Jiri Olsa a Ãcrit :
>> I made the modification, plz check the attached diff.
>>
>> I found some places where the read_lock is not ahead of the check:
>> "if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))"
>>
>> I'm not sure we dont want to address those as well; located in following
>> files:
>> drivers/net/tun.c
>> net/core/stream.c
>> net/sctp/socket.c
>> net/sunrpc/svcsock.c
>
> We'll take care of them later :)
>
>>
>> thanks,
>> jirka
>>
>
> This patch is OK with me, please submit a new formal patch with
> fresh ChangeLog so that we can all agree and Signed-off-by/Acked-by
>
> Oleg, I think your comment can be addressed in a followup patch ?
>
> Thanks to all

To clarify, I meant the second comment from Oleg.

Jiri, please define a "smp_mb__after_lock()" instead of smp_mb__after_read_lock()

+/* The {read|write|spin}_lock() on x86 are full memory barriers. */
+#define smp_mb__after_lock() do { } while (0)
+
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/