Subject: Re: [PATCH net-next 02/17] net: sched: protect block state with spinlock

From: Stefano Brivio <[email-masked]>
Date: Tue, 13 Nov 2018 11:07:12 +0100

Vlad,

On Mon, 12 Nov 2018 09:28:59 -0800 (PST)
David Miller <[email-masked]> wrote:

> From: Vlad Buslov <[email-masked]>
> Date: Mon, 12 Nov 2018 09:55:31 +0200
> 
> > +#define ASSERT_BLOCK_LOCKED(block)					\
> > +	WARN_ONCE(!spin_is_locked(&(block)->lock),		\
> > +		  "BLOCK: assertion failed at %s (%d)\n", __FILE__,  __LINE__)  
> 
> spin_is_locked() is not usable for assertions.

See also b86077207d0c ("igbvf: Replace spin_is_locked() with lockdep").

-- 
Stefano