diff options
author | Alexander Aring <alex.aring@gmail.com> | 2015-10-22 12:11:27 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-10-22 12:24:42 +0200 |
commit | aeedebff6961d96e9df58799e6c3a93513d6f66b (patch) | |
tree | 1c6ec387b96e2014a53ec9fdacdbdf1dfa461766 /lib/hexdump.c | |
parent | 88d07feb097b60fcca20ba63d2920b0f05a05fa0 (diff) | |
download | op-kernel-dev-aeedebff6961d96e9df58799e6c3a93513d6f66b.zip op-kernel-dev-aeedebff6961d96e9df58799e6c3a93513d6f66b.tar.gz |
ieee802154: 6lowpan: fix memory leak
Looking at current situation of memory management in 6lowpan receive
function I detected some invalid handling. After calling
lowpan_invoke_rx_handlers we will do a kfree_skb and then NET_RX_DROP on
error handling. We don't do this before, also on
skb_share_check/skb_unshare which might manipulate the reference
counters.
After running some 'grep -r "dev_add_pack" net/' to look how others
packet-layer receive callbacks works I detected that every subsystem do
a kfree_skb, then NET_RX_DROP without calling skb functions which
might manipulate the skb reference counters. This is the reason why we
should do the same here like all others subsystems. I didn't find any
documentation how the packet-layer receive callbacks handle NET_RX_DROP
return values either.
This patch will add a kfree_skb, then NET_RX_DROP handling for the
"trivial checks", in case of skb_share_check/skb_unshare the kfree_skb
call will be done inside these functions.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'lib/hexdump.c')
0 files changed, 0 insertions, 0 deletions