]> git.baikalelectronics.ru Git - kernel.git/commit
batman-adv: reorder clean up routine in order to avoid race conditions
authorAntonio Quartulli <ordex@autistici.org>
Mon, 6 May 2013 23:06:18 +0000 (01:06 +0200)
committerAntonio Quartulli <ordex@autistici.org>
Thu, 9 May 2013 10:39:45 +0000 (12:39 +0200)
commit5b4e1bb973564b4ec8cff412db3e7e21566ae797
tree4a9e979287905c7c94d9229640870af0b8d853bc
parent5b6b4588f81ac55fdf2f42ec50794db764ac26b7
batman-adv: reorder clean up routine in order to avoid race conditions

nc_worker accesses the originator table during its periodic
work, but since the originator table is freed before
stopping the worker this leads to a global protection fault.

Fix this by killing the worker (in nc_free) before freeing
the originator table.

Moreover tidy up the entire clean up routine by running all
the subcomponents freeing procedures first and then killing
the TT and the originator tables at the end.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
net/batman-adv/main.c