[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTimqt22PHNsYt=M4de9VwGEB7REKqtc4zOanZ+JB@mail.gmail.com>
Date: Wed, 18 Aug 2010 17:08:37 +0800
From: Yong Zhang <yong.zhang0@...il.com>
To: Stefan Richter <stefanr@...6.in-berlin.de>
Cc: Clemens Ladisch <clemens@...isch.de>,
Peter Zijlstra <peterz@...radead.org>,
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, Aug 18, 2010 at 4:09 PM, Stefan Richter
<stefanr@...6.in-berlin.de> wrote:
> Again, is the term "interrupt contexts" meant to include softIRQ contexts?
I can't think out a scene which prevent del_timer_sync() from using in
softirq. :(
Then I go back and find that comments comes before linux-2.6.12,
then in linux-2.6.12, del_timer_sync() is like this:
int del_timer_sync(struct timer_list *timer)
{
tvec_base_t *base;
int i, ret = 0;
check_timer(timer);
del_again:
ret += del_timer(timer);
for_each_online_cpu(i) {
base = &per_cpu(tvec_bases, i);
if (base->running_timer == timer) {
while (base->running_timer == timer) {
cpu_relax();
preempt_check_resched();
}
break;
}
}
smp_rmb();
if (timer_pending(timer))
goto del_again;
return ret;
}
EXPORT_SYMBOL(del_timer_sync);
Seems preempt_check_resched() is the proof of that comments, but
now del_timer_sync() is changed.
I don't know if there is any other restriction.
Thanks,
Yong
>
> (Nothing in firewire-core/-sbp2/-net etc. is called in hardware
> interrupts. BTW, we actually could and maybe should change all the
> spinlocks in them from spin_lock_irq to spin_lock_bh. Only
> firewire-ohci's local ohci->lock needs to be IRQ safe. OTOH this could
> change if somebody comes up with a migration of the stack to threaded
> IRQ handling.)
> --
> Stefan Richter
> -=====-==-=- =--- =--=-
> http://arcgraph.de/sr/
>
--
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