connector: bump skb->users before callback invocation
authorFlorian Westphal <fw@strlen.de>
Thu, 31 Dec 2015 13:26:33 +0000 (14:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jan 2016 05:49:33 +0000 (21:49 -0800)
commit644acb9f488360cb40653f027dc5278021ed1383
tree15fb87026637338376dd7acc9a5f4630e514458f
parent4a3411cc43643e671f885fb505a48b43564bc6d5
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/connector/connector.c