| Submitter | Patrick McHardy |
|---|---|
| Date | Aug. 20, 2012, 6:18 a.m. |
| Message ID | <1345443532-3707-4-git-send-email-kaber@trash.net> |
| Download | mbox | patch |
| Permalink | /patch/178667/ |
| State | Not Applicable |
| Headers | show |
Comments
Patch
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 1bdfa52..3233601 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -886,7 +886,7 @@ static struct sk_buff *netlink_trim(struct sk_buff *skb, gfp_t allocation) { int delta; - skb_orphan(skb); + WARN_ON(skb->sk != NULL); delta = skb->end - skb->tail; if (delta * 2 < skb->truesize)
Netlink doesn't account skbs to the sending socket, so the there's no need to orphan the skb before trimming it. Removing the skb_orphan() call is required for mmap'ed netlink, which uses a netlink specific skb destructor that must not be invoked before the final freeing of the skb. Signed-off-by: Patrick McHardy <kaber@trash.net> --- net/netlink/af_netlink.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)