Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 09686b56 authored by Linus Lüssing's avatar Linus Lüssing Committed by Greg Kroah-Hartman
Browse files

Staging: batman-adv: Always synchronize rcu's on module shutdown



During the module shutdown procedure in batman_exit(), a rcu callback is
being scheduled (batman_exit -> hardif_remove_interfaces ->
hardif_remove_interfae -> call_rcu). However, when the kernel unloads
the module, the rcu callback might not have been executed yet, resulting
in a "unable to handle kernel paging request" in __rcu_process_callback
afterwards, causing the kernel to freeze.

The synchronize_net and synchronize_rcu in mesh_free are currently
called before the call_rcu in hardif_remove_interface and have no real
effect on it.

Therefore, we should always flush all rcu callback functions scheduled
during the shutdown procedure using synchronize_net. The call to
synchronize_rcu can be omitted because synchronize_net already calls it.

Signed-off-by: default avatarLinus Lüssing <linus.luessing@web.de>
Signed-off-by: default avatarSven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 6267ea65
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment