diff options
author | Sven Eckelmann <sven@narfation.org> | 2016-08-06 16:50:52 +0300 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2016-11-20 04:17:18 +0300 |
commit | e0011c6c5e7192b76c86f47d77fefbbeab21f2bf (patch) | |
tree | 1b2503946fdeb0c8ab23ce03a6091fe5e53d56bf /drivers/clocksource | |
parent | cc4b42788be7193814efe43e3dac57cadc15076f (diff) | |
download | linux-e0011c6c5e7192b76c86f47d77fefbbeab21f2bf.tar.xz |
batman-adv: Add missing refcnt for last_candidate
commit 936523441bb64cdc9a5b263e8fd2782e70313a57 upstream.
batadv_find_router dereferences last_bonding_candidate from
orig_node without making sure that it has a valid reference. This reference
has to be retrieved by increasing the reference counter while holding
neigh_list_lock. The lock is required to avoid that
batadv_last_bonding_replace removes the current last_bonding_candidate,
reduces the reference counter and maybe destroys the object in this
process.
Fixes: f3b3d9018975 ("batman-adv: add bonding again")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
[bwh: Backported to 3.16:
- s/kref_get/atomic_inc/
- s/_put/_free_ref/]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers/clocksource')
0 files changed, 0 insertions, 0 deletions