Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1585735 > unrolled thread
| Started by | Tejun Heo <tj@kernel.org> |
|---|---|
| First post | 2017-02-21 22:00 +0100 |
| Last post | 2017-02-21 22:00 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] kernfs: fix locking around kernfs_ops->release() callback Tejun Heo <tj@kernel.org> - 2017-02-21 22:00 +0100
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Date | 2017-02-21 22:00 +0100 |
| Subject | Re: [PATCH] kernfs: fix locking around kernfs_ops->release() callback |
| Message-ID | <tdpHs-7P4-21@gated-at.bofh.it> |
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@kernel.org>
> Reported-by: Tony Lindgren <tony@atomide.com>
> Fixes: 0e67db2f9fe9 ("kernfs: add kernfs_ops->open/release() callbacks")
Applied to cgroup/for-4.11.
Thanks.
--
tejun
Back to top | Article view | linux.kernel
csiph-web