Ok, I think I figured it out!
The __rcu macro I mentioned in my last post expands to the noderef and address_space() macro annotations, which according to
this page, should only be used to data structures.
Therefore my previous idea to use this macro to annotate the definition of the function ieee80211_set_beacon_cntdwn() was wrong.
Instead, I think ieee80211_set_beacon_cntdwn() should be annotated with the
__must_hold() macro, which according to the
sparse documentation should be passed the name of the struct that the function is expected to have a lock on when it is called.
The call to rcu_dereference() in the body of ieee80211_set_beacon_cntdwn() is passed the struct named "link", like so:
Code:
rcu_dereference(link->u.ap.probe_resp)
So I think the annotation should ultimately be:
Can anyone with more kernel development experience confirm if my reasoning is correct here?