Re: [PATCH v2 1/3] lockdep: add lockdep_assert_not_held()

2021-03-01 Thread Peter Zijlstra
On Fri, Feb 26, 2021 at 02:16:12PM -0700, Shuah Khan wrote: > On 2/26/21 2:07 PM, Peter Zijlstra wrote: > > On Fri, Feb 26, 2021 at 10:52:13AM -0700, Shuah Khan wrote: > > > + /* avoid false negative lockdep_assert_not_held() > > > + * and lockdep_assert_held() > > > + */

Re: [PATCH v2 1/3] lockdep: add lockdep_assert_not_held()

2021-02-26 Thread Shuah Khan
On 2/26/21 2:07 PM, Peter Zijlstra wrote: On Fri, Feb 26, 2021 at 10:52:13AM -0700, Shuah Khan wrote: + /* avoid false negative lockdep_assert_not_held() +* and lockdep_assert_held() +*/ That's a coding style fail. Checkpatch didn't complain. Wh

Re: [PATCH v2 1/3] lockdep: add lockdep_assert_not_held()

2021-02-26 Thread Peter Zijlstra
On Fri, Feb 26, 2021 at 10:52:13AM -0700, Shuah Khan wrote: > + /* avoid false negative lockdep_assert_not_held() > + * and lockdep_assert_held() > + */ That's a coding style fail.

[PATCH v2 1/3] lockdep: add lockdep_assert_not_held()

2021-02-26 Thread Shuah Khan
Some kernel functions must be called without holding a specific lock. Add lockdep_assert_not_held() to be used in these functions to detect incorrect calls while holding a lock. lockdep_assert_not_held() provides the opposite functionality of lockdep_assert_held() which is used to assert calls tha