Skip to content

Commit

Permalink
netlink: Fix skb ref counting.
Browse files Browse the repository at this point in the history
Commit f9c2288 (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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Pravin B Shelar authored and David S. Miller committed May 1, 2013
1 parent 0dcffd0 commit ae6164a
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion net/netlink/af_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ae6164a

Please sign in to comment.