]> git.baikalelectronics.ru Git - kernel.git/commit
6lowpan: move skb_free from error paths in decompression
authorMartin Townsend <mtownsend1973@gmail.com>
Thu, 6 Nov 2014 19:15:13 +0000 (19:15 +0000)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 6 Nov 2014 21:09:48 +0000 (22:09 +0100)
commit2523f3a65b331b1fb7001e3bd66da6bed49934ff
treea4d6ab3f6bbf38f4c5b3cb66cc6f77d142397e32
parent2c7b321af4de973b9aec944bbf30ad8d555c7f94
6lowpan: move skb_free from error paths in decompression

Currently we ensure that the skb is freed on every error path in IPHC
decompression which makes it easy to introduce skb leaks.  By centralising
the skb_free into the receive function it makes future decompression routines
easier to maintain.  It does come at the expense of ensuring that the skb
passed into the decompression routine must not be copied.

Signed-off-by: Martin Townsend <mtownsend1973@gmail.com>
Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Acked-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/6lowpan/iphc.c
net/bluetooth/6lowpan.c
net/ieee802154/6lowpan_rtnl.c