[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1282121942.1926.3552.camel@laptop>
Date: Wed, 18 Aug 2010 10:59:02 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Clemens Ladisch <clemens@...isch.de>
Cc: Stefan Richter <stefanr@...6.in-berlin.de>,
Yong Zhang <yong.zhang0@...il.com>,
Johannes Berg <johannes@...solutions.net>,
Thomas Gleixner <tglx@...utronix.de>,
linux1394-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: Re: lockdep false positive? -- firewire-core transaction timer vs.
scsi-core host lock
On Wed, 2010-08-18 at 09:01 +0200, Clemens Ladisch wrote:
> +retry:
> spin_lock_irqsave(&card->lock, flags);
> list_for_each_entry(t, &card->transaction_list, link) {
> if (t == transaction) {
> + if (!del_timer(&t->split_timeout_timer)) {
> + /* wait for the timer to cancel it */
> + spin_unlock_irqrestore(&card->lock, flags);
> + cpu_relax();
> + goto retry;
> + }
Open-coding spin loops like that is really ugly, and could cause trouble
for -rt.
Also, I believe that if you want the very same semantics as before, you
need to use try_to_del_timer_sync(), not del_timer().
Also, if del_timer_sync() is not allowed from any interrupt context
(including softirq) then doing the spin-loop like that doesn't actually
solve anything.
Thomas, any comments?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists