summaryrefslogtreecommitdiff
path: root/include/linux/netfilter_netdev.h
diff options
context:
space:
mode:
authorNick Terrell <terrelln@fb.com>2022-12-13 16:21:55 -0800
committerNick Terrell <terrelln@fb.com>2022-12-13 16:21:55 -0800
commit4f2c0a4acffbec01079c28f839422e64ddeff004 (patch)
tree06ada4a8a6d94a94c93944806041b8c994cebfc5 /include/linux/netfilter_netdev.h
parent88a309465b3f05a100c3b81966982c0f9f5d23a6 (diff)
parent830b3c68c1fb1e9176028d02ef86f3cf76aa2476 (diff)
Merge branch 'main' into zstd-linus
Diffstat (limited to 'include/linux/netfilter_netdev.h')
-rw-r--r--include/linux/netfilter_netdev.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/netfilter_netdev.h b/include/linux/netfilter_netdev.h
index b4dd96e4dc8d..8676316547cc 100644
--- a/include/linux/netfilter_netdev.h
+++ b/include/linux/netfilter_netdev.h
@@ -99,9 +99,13 @@ static inline struct sk_buff *nf_hook_egress(struct sk_buff *skb, int *rc,
return skb;
nf_hook_state_init(&state, NF_NETDEV_EGRESS,
- NFPROTO_NETDEV, dev, NULL, NULL,
+ NFPROTO_NETDEV, NULL, dev, NULL,
dev_net(dev), NULL);
+
+ /* nf assumes rcu_read_lock, not just read_lock_bh */
+ rcu_read_lock();
ret = nf_hook_slow(skb, &state, e, 0);
+ rcu_read_unlock();
if (ret == 1) {
return skb;