All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ceph: clean up some unsafe dentry->d_parent accesses
@ 2016-12-13 18:04 Jeff Layton
  2016-12-13 18:04 ` [PATCH 1/3] ceph: clean up unsafe d_parent access in __choose_mds Jeff Layton
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jeff Layton @ 2016-12-13 18:04 UTC (permalink / raw)
  To: ceph-devel; +Cc: zyan, sage, idryomov, linux-fsdevel, dhowells, viro

In several places, the kcephfs client accesses dentry->d_parent without
holding appropriate locking. This is not safe, as you can race with
renames that can morph the tree such that is changes and dentries found
previously can end up freed. This patchset fixes these places to access
the parent(s) safely, mostly using the rcu_read_lock().

Note that I'm not aware of any specific bug reports in this area --
these were just discovered by inspection (mostly by Zheng). This passes
xfstests at least up to test generic/095, where we hit an unrelated
softlockup in the splice write code (http://tracker.ceph.com/issues/18130).

Tracker bug link: http://tracker.ceph.com/issues/18148

Jeff Layton (3):
  ceph: clean up unsafe d_parent access in __choose_mds
  ceph: clean up unsafe d_parent accesses in build_dentry_path
  ceph: fix unsafe dcache access in ceph_encode_dentry_release

 fs/ceph/caps.c       |  7 ++++--
 fs/ceph/mds_client.c | 68 +++++++++++++++++++++++++++++++++++-----------------
 2 files changed, 51 insertions(+), 24 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-12-14 13:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-13 18:04 [PATCH 0/3] ceph: clean up some unsafe dentry->d_parent accesses Jeff Layton
2016-12-13 18:04 ` [PATCH 1/3] ceph: clean up unsafe d_parent access in __choose_mds Jeff Layton
2016-12-14  8:58   ` Yan, Zheng
2016-12-14 12:04     ` Jeff Layton
2016-12-14 12:55   ` [PATCH v2] " Jeff Layton
2016-12-14 13:21     ` Yan, Zheng
2016-12-13 18:04 ` [PATCH 2/3] ceph: clean up unsafe d_parent accesses in build_dentry_path Jeff Layton
2016-12-13 18:04 ` [PATCH 3/3] ceph: fix unsafe dcache access in ceph_encode_dentry_release Jeff Layton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.