Thread (5 messages) flat view 5 messages, 4 authors, 2017-05-23

Re: 4.12-RC2 BUG: scheduling while atomic: irq/47-iwlwifi

From: Arend Van Spriel <arend.vanspriel@broadcom.com>
Date: 2017-05-23 07:19:29
Also in: linux-wireless

Possibly related (same subject, not in this thread)

On 22-5-2017 23:04, Johannes Berg wrote:
Hi Arend,

Sorry, I forgot that the original message wasn't Cc'ed to the wireless
list, only netdev.
That explains. Not subscribed to that.
quoted
+++ b/net/wireless/scan.c
@@ -322,9 +322,7 @@ static void cfg80211_del_sched_scan_req(struct
cfg80211_regi
 {
        struct cfg80211_sched_scan_request *pos;

-       ASSERT_RTNL();
-
-       list_for_each_entry(pos, &rdev->sched_scan_req_list, list) {
+       list_for_each_entry_rcu(pos, &rdev->sched_scan_req_list,
list) {
[snip]

This looks fine, but perhaps in the above we should have some kind of
locking assertion, e.g.

	WARN_ON_ONCE(!rcu_read_lock_held() && !lockdep_rtnl_is_held());
Thought about something like this after sending the email. So there are
two call sites. One for scheduled scan results notification and one in
scheduled scan stop scenario. So for the latter it is not needed to use
the rcu_read_lock() as it should have RTNL lock hence the two checks above?

Will create a formal patch.

Regards,
Arend
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help