Messages in this thread | | | Subject | Re: lockdep false positive? -- firewire-core transaction timer vs. scsi-core host lock | From | Peter Zijlstra <> | Date | Wed, 18 Aug 2010 10:59:02 +0200 |
| |
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?
| |