diff mbox

[net-next] netlink: Fix skb ref counting.

Message ID 1367304721-9213-1-git-send-email-pshelar@nicira.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Pravin B Shelar April 30, 2013, 6:52 a.m. UTC
Commit f9c2288837ba072b21dba955f04a4c97eaa77b1e (netlink:
implement memory mapped recvmsg) increamented skb->users
ref count twice for a dump op which does not look right.

Following patch fixes that.

CC: Patrick McHardy <kaber@trash.net>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
---
 net/netlink/af_netlink.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

Comments

David Miller April 30, 2013, 7:47 p.m. UTC | #1
From: Pravin B Shelar <pshelar@nicira.com>
Date: Mon, 29 Apr 2013 23:52:01 -0700

> Commit f9c2288837ba072b21dba955f04a4c97eaa77b1e (netlink:
> implement memory mapped recvmsg) increamented skb->users
> ref count twice for a dump op which does not look right.
> 
> Following patch fixes that.
> 
> CC: Patrick McHardy <kaber@trash.net>
> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>

Patrick, please review this, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller May 1, 2013, 6:58 p.m. UTC | #2
From: Pravin B Shelar <pshelar@nicira.com>
Date: Mon, 29 Apr 2013 23:52:01 -0700

> Commit f9c2288837ba072b21dba955f04a4c97eaa77b1e (netlink:
> implement memory mapped recvmsg) increamented skb->users
> ref count twice for a dump op which does not look right.
> 
> Following patch fixes that.
> 
> CC: Patrick McHardy <kaber@trash.net>
> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>

I'm tired of waiting for Patrick to review this, to me a lack of a
timely review translated into "it's not important to me" so...

Applied, thanks Pravin.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index d9c7869..12ac6b4 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -2504,7 +2504,6 @@  int __netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
 	cb->data = control->data;
 	cb->module = control->module;
 	cb->min_dump_alloc = control->min_dump_alloc;
-	atomic_inc(&skb->users);
 	cb->skb = skb;
 
 	sk = netlink_lookup(sock_net(ssk), ssk->sk_protocol, NETLINK_CB(skb).portid);