diff options
author | 2022-08-23 10:46:46 -0700 | |
---|---|---|
committer | 2022-08-24 13:46:57 +0100 | |
commit | 5dcd08cd19912892586c6082d56718333e2d19db (patch) | |
tree | 0c29065e2077fc424d1d16c459d887dc81c10b5c /net/core/gro_cells.c | |
parent | net: Fix data-races around weight_p and dev_weight_[rt]x_bias. (diff) | |
download | wireguard-linux-5dcd08cd19912892586c6082d56718333e2d19db.tar.xz wireguard-linux-5dcd08cd19912892586c6082d56718333e2d19db.zip |
net: Fix data-races around netdev_max_backlog.
While reading netdev_max_backlog, it can be changed concurrently.
Thus, we need to add READ_ONCE() to its readers.
While at it, we remove the unnecessary spaces in the doc.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/gro_cells.c')
-rw-r--r-- | net/core/gro_cells.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/gro_cells.c b/net/core/gro_cells.c index 541c7a72a28a..21619c70a82b 100644 --- a/net/core/gro_cells.c +++ b/net/core/gro_cells.c @@ -26,7 +26,7 @@ int gro_cells_receive(struct gro_cells *gcells, struct sk_buff *skb) cell = this_cpu_ptr(gcells->cells); - if (skb_queue_len(&cell->napi_skbs) > netdev_max_backlog) { + if (skb_queue_len(&cell->napi_skbs) > READ_ONCE(netdev_max_backlog)) { drop: dev_core_stats_rx_dropped_inc(dev); kfree_skb(skb); |