aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/gro.h
diff options
context:
space:
mode:
authorKuniyuki Iwashima <kuniyu@amazon.com>2022-08-23 10:46:58 -0700
committerDavid S. Miller <davem@davemloft.net>2022-08-24 13:46:58 +0100
commit8db24af3f02ebdbf302196006ebb270c4c3a2706 (patch)
treede9bc7668e1523979c789b5cfe6ea578b10967ca /include/net/gro.h
parentnet: Fix data-races around sysctl_devconf_inherit_init_net. (diff)
downloadlinux-dev-8db24af3f02ebdbf302196006ebb270c4c3a2706.tar.xz
linux-dev-8db24af3f02ebdbf302196006ebb270c4c3a2706.zip
net: Fix a data-race around gro_normal_batch.
While reading gro_normal_batch, it can be changed concurrently. Thus, we need to add READ_ONCE() to its reader. Fixes: 323ebb61e32b ("net: use listified RX for handling GRO_NORMAL skbs") Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Acked-by: Edward Cree <ecree.xilinx@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--include/net/gro.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/gro.h b/include/net/gro.h
index 867656b0739c..24003dea8fa4 100644
--- a/include/net/gro.h
+++ b/include/net/gro.h
@@ -439,7 +439,7 @@ static inline void gro_normal_one(struct napi_struct *napi, struct sk_buff *skb,
{
list_add_tail(&skb->list, &napi->rx_list);
napi->rx_count += segs;
- if (napi->rx_count >= gro_normal_batch)
+ if (napi->rx_count >= READ_ONCE(gro_normal_batch))
gro_normal_list(napi);
}