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: <20170221205051.GC8260@htj.duckdns.org>
Date:   Tue, 21 Feb 2017 15:50:51 -0500
From:   Tejun Heo <tj@...nel.org>
To:     linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Tony Lindgren <tony@...mide.com>
Subject: Re: [PATCH] kernfs: fix locking around kernfs_ops->release() callback

On Sun, Feb 12, 2017 at 05:33:02AM +0900, Tejun Heo wrote:
> The release callback may be called from two places - file release
> operation and kernfs open file draining.  kernfs_open_file->mutex is
> used to synchronize the two callsites.  This unfortunately leads to
> possible circular locking because of->mutex is used to protect the
> usual kernfs operations which may use locking constructs which are
> held while removing and thus draining kernfs files.
> 
> @of->mutex is for synchronizing concurrent kernfs access operations
> and all we need here is synchronization between the releaes and drain
> paths.  As the drain path has to grab kernfs_open_file_mutex anyway,
> let's use the mutex to synchronize the release operation instead.
> 
> Signed-off-by: Tejun Heo <tj@...nel.org>
> Reported-by: Tony Lindgren <tony@...mide.com>
> Fixes: 0e67db2f9fe9 ("kernfs: add kernfs_ops->open/release() callbacks")

Applied to cgroup/for-4.11.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ