mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
batman-adv: add sanity check when removing global tts
After removing the batman-adv module, the hash may be already gone when tt_global_del_orig() tries to clean the hash. This patch adds a sanity check to avoid this. Signed-off-by: Simon Wunderlich <[email protected]> Tested-by: Alexey Fisher <[email protected]> Signed-off-by: Marek Lindner <[email protected]>
This commit is contained in:
parent
531027fcdd
commit
6e8014947d
1 changed files with 3 additions and 0 deletions
|
|
@ -698,6 +698,9 @@ void tt_global_del_orig(struct bat_priv *bat_priv,
|
|||
struct hlist_head *head;
|
||||
spinlock_t *list_lock; /* protects write access to the hash lists */
|
||||
|
||||
if (!hash)
|
||||
return;
|
||||
|
||||
for (i = 0; i < hash->size; i++) {
|
||||
head = &hash->table[i];
|
||||
list_lock = &hash->list_locks[i];
|
||||
|
|
|
|||
Loading…
Reference in a new issue