Re: lockdep false positive? -- firewire-core transaction timer vs. scsi-core host lock

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Yong Zhang
Date: Wednesday, August 18, 2010 - 2:08 am

On Wed, Aug 18, 2010 at 4:09 PM, Stefan Richter
<stefanr@s5r6.in-berlin.de> wrote:

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

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: lockdep false positive? -- firewire-core transaction t ..., Yong Zhang, (Wed Aug 18, 2:08 am)