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:
committed by
David S. Miller
parent
3ba8c6258e
commit
91341fa000
@@ -144,7 +144,8 @@ static void ip_expire(struct timer_list *t)
|
||||
|
||||
rcu_read_lock();
|
||||
|
||||
if (qp->q.fqdir->dead)
|
||||
/* Paired with WRITE_ONCE() in fqdir_pre_exit(). */
|
||||
if (READ_ONCE(qp->q.fqdir->dead))
|
||||
goto out_rcu_unlock;
|
||||
|
||||
spin_lock(&qp->q.lock);
|
||||
|
||||
Reference in New Issue
Block a user