提交 0e087858 编写于 作者: P Patrick McHardy 提交者: David S. Miller

connector: fix skb double free in cn_rx_skb()

When a skb is delivered to a registered callback, cn_call_callback()
incorrectly returns -ENODEV after freeing the skb, causing cn_rx_skb()
to free the skb a second time.
Reported-by: NEric B Munson <emunson@mgebm.net>
Signed-off-by: NPatrick McHardy <kaber@trash.net>
Tested-by: NEric B Munson <emunson@mgebm.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 192910a6
......@@ -142,6 +142,7 @@ static int cn_call_callback(struct sk_buff *skb)
cbq->callback(msg, nsp);
kfree_skb(skb);
cn_queue_release_callback(cbq);
err = 0;
}
return err;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册