Skip to content

Sleeping functions in invalid context bug fixes

Luis Henriques ceph-devel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4libceph: allow ceph_buffer_put() to receive a NULL ceph_bufferinclude/linux/ceph/buffer.h+2 -10 replies
2/4ceph: fix buffer free while holding i_ceph_lock in __ceph_setxattr()fs/ceph/xattr.c+6 -24 replies
3/4ceph: fix buffer free while holding i_ceph_lock in __ceph_build_xattrs_blob()fs/ceph/caps.c fs/ceph/snap.c fs/ceph/super.h +1 more+16 -60 replies
4/4ceph: fix buffer free while holding i_ceph_lock in fill_inode()fs/ceph/inode.c+4 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] Sleeping functions in invalid context bug fixes

Hi,

I'm sending three "sleeping function called from invalid context" bug fixes that I had on my TODO for a while. All of them are ceph_buffer_put related, and all the fixes follow the same pattern: delay the operation until the ci->i_ceph_lock is released.

The first patch simply allows ceph_buffer_put to receive a NULL buffer so that the NULL check doesn't need to be performed in all the other patches. IOW, it's not really required, just convenient.

(Note: maybe these patches should all be tagged for stable.)

Luis Henriques (4):
libceph: allow ceph_buffer_put() to receive a NULL ceph_buffer
ceph: fix buffer free while holding i_ceph_lock in __ceph_setxattr()
ceph: fix buffer free while holding i_ceph_lock in

    __ceph_build_xattrs_blob()

ceph: fix buffer free while holding i_ceph_lock in fill_inode()

 fs/ceph/caps.c              |  5 ++++-
 fs/ceph/inode.c             |  7 ++++---
 fs/ceph/snap.c              |  4 +++-
 fs/ceph/super.h             |  2 +-
 fs/ceph/xattr.c             | 19 ++++++++++++++-----
 include/linux/ceph/buffer.h |  3 ++-
 6 files changed, 28 insertions(+), 12 deletions(-)