connector: bump skb->users before callback invocation
authorFlorian Westphal <fw@strlen.de>
Thu, 31 Dec 2015 13:26:33 +0000 (14:26 +0100)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 15 Feb 2016 20:42:42 +0000 (15:42 -0500)
commit9776b3e2f1e6fc0afcdcfe70ee14fb1b8dd03dff
tree3d3bd43d19d28410eb1f7537075bada1b462e579
parentb079e7be7daad50d4b8b30776d368b709a4b7aae
connector: bump skb->users before callback invocation

[ Upstream commit 55285bf09427c5abf43ee1d54e892f352092b1f1 ]

Dmitry reports memleak with syskaller program.
Problem is that connector bumps skb usecount but might not invoke callback.

So move skb_get to where we invoke the callback.

Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/connector/connector.c