[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180323163331.ajxula7nj5bmqiwh@linutronix.de>
Date: Fri, 23 Mar 2018 17:33:31 +0100
From: "bigeasy@...utronix.de" <bigeasy@...utronix.de>
To: Bart Van Assche <Bart.VanAssche@....com>
Cc: "acme@...nel.org" <acme@...nel.org>,
"nab@...ux-iscsi.org" <nab@...ux-iscsi.org>,
"daniel@...stot.me" <daniel@...stot.me>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"peterz@...radead.org" <peterz@...radead.org>,
"rostedt@...dmis.org" <rostedt@...dmis.org>,
"torvalds@...ux-foundation.org" <torvalds@...ux-foundation.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"williams@...hat.com" <williams@...hat.com>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"lclaudio@...hat.com" <lclaudio@...hat.com>,
"target-devel@...r.kernel.org" <target-devel@...r.kernel.org>,
"linux-rt-users@...r.kernel.org" <linux-rt-users@...r.kernel.org>
Subject: Re: [PATCH] target: Use WARNON_NON_RT(!irqs_disabled())
On 2018-03-23 16:25:25 [+0000], Bart Van Assche wrote:
> On Fri, 2018-03-23 at 16:55 +0100, Sebastian Andrzej Siewior wrote:
> > I am going take this into -RT tree for now until we have different
> > solution.
>
> Have you considered to delete the WARN_ON_ONCE(!irqs_disabled()) statement?
> I think that check duplicates functionality that already exists in lockdep
> since lockdep is already able to detect spinlock use inconsistencies.
correct. That is why I suggested to use lockdep_assert_held() instead of
this IRQ-check + the spin_lock_assert().
The only downside is that this code (as of now) works with lockdep
disabled. On the other hand, lockdep_assert_held() gives you a splat
instead of a BUG() statement like spin_lock_assert() does so I clearly
promote lockdep here :)
> Bart.
Sebastian
Powered by blists - more mailing lists