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]
Date:	Mon, 25 Apr 2016 13:51:15 -0400
From:	Tejun Heo <tj@...nel.org>
To:	Roman Penyaev <roman.penyaev@...fitbricks.com>
Cc:	Jens Axboe <axboe@...nel.dk>, linux-block@...r.kernel.org,
	linux-kernel@...r.kernel.org, David Howells <dhowells@...hat.com>
Subject: Re: [PATCH 1/1] [RFC] workqueue: fix ghost PENDING flag while doing
 MQ IO

Hello, Roman.

On Mon, Apr 25, 2016 at 07:39:52PM +0200, Roman Penyaev wrote:
> Ok, that's clear now. Thanks. I was confused also by a spin lock, which
> is being released just after clear pending:
> 
>    set_work_pool_and_clear_pending(work, pool->id);
>    spin_unlock_irq(&pool->lock);
>    ...
>    worker->current_func(work);
> 
> But seems memory operations of execution can leak-in and appear before
> pended bit is cleared and spin lock is released.
> (according to Documentation/memory-barriers.txt, (6) RELEASE operations)

Yeap, release doesn't prevent following reads from creeping ahead of
it.

> Tejun, do you need an updated patch for that? With a proper smp_mb()?

Yes, can you please also add comment explaining what the mb is
interlocking?

Thanks a lot!

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ