On Mon, Sep 06, 2010 at 01:29:53AM +0200, Linus Lüssing wrote:
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. Therefore, we should always flush all rcu callback functions scheduled during the shutdown procedure.
I am really irritated by your patch. I would have expected that you add a synchronyze_rcu in batman_exit and that was it. Instead I see a synchronize_net added and a synchronize_net/-_rcu removed from mesh_free. This doesn't seem to match at all. Could you please explain further why it is implemented that way?
thanks, Sven