[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <795b0dd6-23e7-8780-7cde-cf309f08109f@broadcom.com>
Date: Wed, 19 Feb 2020 22:33:29 +0100
From: Arend Van Spriel <arend.vanspriel@...adcom.com>
To: Johannes Berg <johannes@...solutions.net>,
Amol Grover <frextrite@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
Cc: linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-kernel-mentees@...ts.linuxfoundation.org,
Joel Fernandes <joel@...lfernandes.org>,
Madhuparna Bhowmik <madhuparnabhowmik10@...il.com>,
"Paul E . McKenney" <paulmck@...nel.org>
Subject: Re: [PATCH] cfg80211: Pass lockdep expression to RCU lists
On 2/19/2020 10:29 PM, Johannes Berg wrote:
> On Wed, 2020-02-19 at 22:27 +0100, Arend Van Spriel wrote:
>> On 2/19/2020 10:13 AM, Johannes Berg wrote:
>>> On Wed, 2020-02-19 at 14:41 +0530, Amol Grover wrote:
>>>>
>>>> - WARN_ON_ONCE(!rcu_read_lock_held() && !lockdep_rtnl_is_held());
>>>> -
>>>> - list_for_each_entry_rcu(pos, &rdev->sched_scan_req_list, list) {
>>>> + list_for_each_entry_rcu(pos, &rdev->sched_scan_req_list, list,
>>>> + lockdep_rtnl_is_held()) {
>>>
>>> Huh, I didn't even know you _could_ do that :)
>>
>> Me neither ;-). Above you are removing the WARN_ON_ONCE() entirely.
>> Would it not be good to keep the WARN_ON_ONCE() with only the
>> !rcu_read_lock_held() check.
>
> Not needed, the macro expansion will already contain
> rcu_read_lock_any_held() just like in all the other cases where you pass
> a lockdep condition to RCU helpers.
Ah, yes. I see it in __list_check_rcu().
Thanks,
Arend
Powered by blists - more mailing lists