[SRU][Bionic][PATCH 1/1] (upstream) netfilter: nf_queue: Fix memory leak in nf_queue_entry_get_refs
Chengen Du
chengen.du at canonical.com
Thu Oct 6 06:00:23 UTC 2022
From: "Chengen Du" <chengen.du at canonical.com>
BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1991774
Remove sock_hold to align upstream commit
c3873070247d9e3c7a6b0cf9bf9b45e8018427b1.
Signed-off-by: Chengen Du <chengen.du at canonical.com>
---
net/netfilter/nf_queue.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c
index dbc45165c533..46984cdee658 100644
--- a/net/netfilter/nf_queue.c
+++ b/net/netfilter/nf_queue.c
@@ -91,8 +91,6 @@ bool nf_queue_entry_get_refs(struct nf_queue_entry *entry)
dev_hold(state->in);
if (state->out)
dev_hold(state->out);
- if (state->sk)
- sock_hold(state->sk);
#if IS_ENABLED(CONFIG_BRIDGE_NETFILTER)
if (entry->skb->nf_bridge) {
struct net_device *physdev;
--
2.34.1
More information about the kernel-team
mailing list