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] [day] [month] [year] [list]
Message-ID: <20190118140526.GB50184@devbig004.ftw2.facebook.com>
Date:   Fri, 18 Jan 2019 06:05:26 -0800
From:   Tejun Heo <tj@...nel.org>
To:     Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
Cc:     LKML <linux-kernel@...r.kernel.org>
Subject: Re: workqueue: Is flush_work() without INIT_WORK() OK?

Hello, Tetsuo.

On Fri, Jan 18, 2019 at 08:58:49PM +0900, Tetsuo Handa wrote:
> 	struct work_struct work;
> 	memset(&work, 0, sizeof(work));
> 	flush_work(&work);
> 
> . Is this behavior defined as "safe and no-op"? If this should be "safe and no-op",

Nope, that's a bug.

> we need to check whether INIT_WORK() was called before starting lockdep checks
> at __flush_work(). If this is not "safe and no-op", I want to emit a warning if
> INIT_WORK() was not called.

Sounds like a good idea.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ