batman-adv: fix hardif_neigh refcount on queue_work() failure
authorMarek Lindner <mareklindner@neomailbox.ch>
Thu, 6 Sep 2018 21:45:55 +0000 (05:45 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Oct 2018 07:48:49 +0000 (09:48 +0200)
commit498c536f59315a7403d9689f8088d3a8df7f5031
treea4ac1ea042f61a5f4f5ccfd9524d2bf59ad24f40
parent3e9f714fb58b14d0cf5465dbec55b20b5446d607
batman-adv: fix hardif_neigh refcount on queue_work() failure

[ Upstream commit 4c4af6900844ab04c9434c972021d7b48610e06a ]

The hardif_neigh refcounter is to be decreased by the queued work and
currently is never decreased if the queue_work() call fails.
Fix by checking the queue_work() return value and decrease refcount
if necessary.

Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/batman-adv/bat_v_elp.c