mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
inet: frags: annotate races around fqdir->dead and fqdir->high_thresh
Both fields can be read/written without synchronization,
add proper accessors and documentation.
Fixes: d5dd88794a
("inet: fix various use-after-free in defrags units")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
3ba8c6258e
commit
91341fa000
4 changed files with 18 additions and 7 deletions
|
@ -67,7 +67,8 @@ ip6frag_expire_frag_queue(struct net *net, struct frag_queue *fq)
|
|||
struct sk_buff *head;
|
||||
|
||||
rcu_read_lock();
|
||||
if (fq->q.fqdir->dead)
|
||||
/* Paired with the WRITE_ONCE() in fqdir_pre_exit(). */
|
||||
if (READ_ONCE(fq->q.fqdir->dead))
|
||||
goto out_rcu_unlock;
|
||||
spin_lock(&fq->q.lock);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue