lkml.org 
[lkml]   [2010]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: lockdep false positive? -- firewire-core transaction timer vs. scsi-core host lock
From
Date
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?


\
 
 \ /
  Last update: 2010-08-18 11:01    [W:0.079 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site