Re: [PATCH net] inet: frags: better deal with smp races

2018-11-08 Thread Eric Dumazet
On 11/08/2018 05:02 PM, David Miller wrote: > GCC is unwilling to see that all paths leading to that final return > statement do in fact set 'fq' one way or another: > > net/ipv4/inet_fragment.c: In function ‘inet_frag_find’: > net/ipv4/inet_fragment.c:224:9: warning: ‘fq’ may be used

Re: [PATCH net] inet: frags: better deal with smp races

2018-11-08 Thread David Miller
From: Eric Dumazet Date: Wed, 7 Nov 2018 22:10:53 -0800 > @@ -204,22 +205,22 @@ static struct inet_frag_queue *inet_frag_create(struct > netns_frags *nf, > /* TODO : call from rcu_read_lock() and no longer use > refcount_inc_not_zero() */ > struct inet_frag_queue *inet_frag_find(struct

[PATCH net] inet: frags: better deal with smp races

2018-11-07 Thread Eric Dumazet
Multiple cpus might attempt to insert a new fragment in rhashtable, if for example RPS is buggy, as reported by 배석진in https://patchwork.ozlabs.org/patch/994601/ We use rhashtable_lookup_get_insert_key() instead of rhashtable_insert_fast() to let cpus losing the race free their own inet_frag_queue