lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070426131311.GD3145@ff.dom.local>
Date:	Thu, 26 Apr 2007 15:13:11 +0200
From:	Jarek Poplawski <jarkao2@...pl>
To:	Oleg Nesterov <oleg@...sign.ru>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
	David Howells <dhowells@...hat.com>
Subject: Re: Fw: [PATCH -mm] workqueue: debug possible endless loop in cancel_rearming_delayed_work

On Wed, Apr 25, 2007 at 04:47:14PM +0400, Oleg Nesterov wrote:
> On 04/25, Jarek Poplawski wrote:
...
> > > > +		spin_lock_irq(&cwq->lock);
> > > > +		/* CPU_DEAD in progress may change cwq */
> > > > +		if (likely(cwq == get_wq_data(work))) {
> > > > +			list_del_init(&work->entry);
> > > > +			__set_bit(WORK_STRUCT_PENDING, work_data_bits(work));
> > > > +			retry = try_to_del_timer_sync(&dwork->timer) < 0;
> > > > +		}
> > > > +		spin_unlock_irq(&cwq->lock);
> > > > +	} while (unlikely(retry));
> 
> >  1. If delayed_work_timer_fn of this work is fired and is waiting
> >  on the above spin_lock then, after above spin_unlock, the work
> >  will be queued.
> 
> No, in that case try_to_del_timer_sync() returns -1.

Yes. But I think it's safe only after moving work_clear_pending
in run_workqueue under a lock; probably otherwise there is a
possibility this flag could be cleared, after above unlock.  

Jarek P.
-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ