Hi,
Sorry for the late reply, I had also missed the Sven's lockdep-assert-patch back then.
On Saturday 28 November 2015 10:49:59 Antonio Quartulli wrote:
Linus,
can you please comment as of why batadv_mcast_mla_tt_retract() requires to hold the tt.commit_lock ?
I don't think it does. At least if you say that a call to batadv_tt_local_remove() as is does not need it (and it seems there are other places calling tt_local_remove() without this lock, too).
[...]
On Sat, Nov 28, 2015 at 09:21:02AM +0100, Sven Eckelmann wrote:
mcast.mla_list is protected by tt.commit_lock (see batadv_mcast_mla_tt_add, batadv_mcast_mla_list_free and batadv_mcast_mla_tt_retract).
mcast.mla_list changes should be protected by the non-parallel code flow: During runtime, batadv_mcast_mla_tt_update() is only called from the self-rearming OGM scheduler thread - batadv_mcast_mla_tt_update() will never run more than once at the same time.
The second place for mcast.mla_list changes, batadv_mcast_free(), is called only on shutdown after the OGM scheduling thread was stopped.
I don't think there should be such races regarding mcast.mla_list - was something like that observed in the wild which lead to inserting the lockdep-asserts?
Cheers, Linus