diff options
| author | Eric Dumazet <[email protected]> | 2025-06-30 12:19:29 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-07-02 21:32:30 +0000 |
| commit | 2dce8c52a98995c4719def6f88629ab1581c0b82 (patch) | |
| tree | dc7bcd58ec7b1544d804b173160aff812941a9b1 /net/core/dst.c | |
| parent | net: dst: annotate data-races around dst->input (diff) | |
| download | kernel-2dce8c52a98995c4719def6f88629ab1581c0b82.tar.gz kernel-2dce8c52a98995c4719def6f88629ab1581c0b82.zip | |
net: dst: annotate data-races around dst->output
dst_dev_put() can overwrite dst->output while other
cpus might read this field (for instance from dst_output())
Add READ_ONCE()/WRITE_ONCE() annotations to suppress
potential issues.
We will likely need RCU protection in the future.
Fixes: 4a6ce2b6f2ec ("net: introduce a new function dst_dev_put()")
Signed-off-by: Eric Dumazet <[email protected]>
Reviewed-by: Kuniyuki Iwashima <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/core/dst.c')
| -rw-r--r-- | net/core/dst.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/dst.c b/net/core/dst.c index 13c629dc7123..52e824e57c17 100644 --- a/net/core/dst.c +++ b/net/core/dst.c @@ -149,7 +149,7 @@ void dst_dev_put(struct dst_entry *dst) if (dst->ops->ifdown) dst->ops->ifdown(dst, dev); WRITE_ONCE(dst->input, dst_discard); - dst->output = dst_discard_out; + WRITE_ONCE(dst->output, dst_discard_out); dst->dev = blackhole_netdev; netdev_ref_replace(dev, blackhole_netdev, &dst->dev_tracker, GFP_ATOMIC); |
