]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
batman-adv: fix reference counting imbalance while sending fragment
authorAntonio Quartulli <antonio@open-mesh.com>
Wed, 23 Apr 2014 12:05:16 +0000 (14:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 May 2014 20:20:38 +0000 (13:20 -0700)
commite450a9b46e0d1c6d0b94a63d0d5fd4273d45de24
tree6dec7c2f817976866ce49d1b74cedbc159ff002e
parentb6bc7a13cab3966f03d3efd79892c8d2f085b919
batman-adv: fix reference counting imbalance while sending fragment

[ Upstream commit be181015a189cd141398b761ba4e79d33fe69949 ]

In the new fragmentation code the batadv_frag_send_packet()
function obtains a reference to the primary_if, but it does
not release it upon return.

This reference imbalance prevents the primary_if (and then
the related netdevice) to be properly released on shut down.

Fix this by releasing the primary_if in batadv_frag_send_packet().

Introduced by ee75ed88879af88558818a5c6609d85f60ff0df4
("batman-adv: Fragment and send skbs larger than mtu")

Cc: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Acked-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/batman-adv/fragmentation.c