linux/fs/ceph
Luis Henriques e5cafce3ad ceph: fix race in concurrent __ceph_remove_cap invocations
A NULL pointer dereference may occur in __ceph_remove_cap with some of the
callbacks used in ceph_iterate_session_caps, namely trim_caps_cb and
remove_session_caps_cb. Those callers hold the session->s_mutex, so they
are prevented from concurrent execution, but ceph_evict_inode does not.

Since the callers of this function hold the i_ceph_lock, the fix is simply
a matter of returning immediately if caps->ci is NULL.

Cc: stable@vger.kernel.org
URL: https://tracker.ceph.com/issues/43272
Suggested-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Luis Henriques <lhenriques@suse.de>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2020-12-14 23:21:47 +01:00
..
acl.c ceph: add caps perf metric for each superblock 2020-06-01 13:22:51 +02:00
addr.c ceph: pass down the flags to grab_cache_page_write_begin 2020-12-14 23:21:47 +01:00
cache.c ceph: replace zero-length array with flexible-array member 2020-03-30 12:42:40 +02:00
cache.h libceph, rbd, ceph: convert to use the new mount API 2019-11-27 22:28:37 +01:00
caps.c ceph: fix race in concurrent __ceph_remove_cap invocations 2020-12-14 23:21:47 +01:00
ceph_frag.c
debugfs.c ceph: add status debugfs file 2020-12-14 23:21:47 +01:00
dir.c ceph: add ceph_sb_to_mdsc helper support to parse the mdsc 2020-10-12 15:29:26 +02:00
export.c ceph: don't return -ESTALE if there's still an open file 2020-06-01 13:22:53 +02:00
file.c libceph, rbd, ceph: "blacklist" -> "blocklist" 2020-10-12 15:29:26 +02:00
inode.c ceph: ensure we have Fs caps when fetching dir link count 2020-12-14 23:21:47 +01:00
io.c ceph: add buffered/direct exclusionary locking for reads and writes 2019-09-16 12:06:25 +02:00
io.h ceph: add buffered/direct exclusionary locking for reads and writes 2019-09-16 12:06:25 +02:00
ioctl.c ceph: consider inode's last read/write when calculating wanted caps 2020-03-30 12:42:42 +02:00
ioctl.h
Kconfig libceph: replace HTTP links with HTTPS ones 2020-08-03 11:05:26 +02:00
locks.c ceph: fix up some warnings on W=1 builds 2020-12-14 23:21:47 +01:00
Makefile ceph: add dentry lease metric support 2020-06-01 13:22:51 +02:00
mds_client.c ceph: fix up some warnings on W=1 builds 2020-12-14 23:21:47 +01:00
mds_client.h ceph: check session state after bumping session->s_seq 2020-11-04 20:55:49 +01:00
mdsmap.c ceph: remove unused variables in ceph_mdsmap_decode() 2020-08-03 11:05:27 +02:00
metric.c ceph: send dentry lease metrics to MDS daemon 2020-12-14 23:21:47 +01:00
metric.h ceph: send dentry lease metrics to MDS daemon 2020-12-14 23:21:47 +01:00
quota.c ceph: check session state after bumping session->s_seq 2020-11-04 20:55:49 +01:00
snap.c ceph: check session state after bumping session->s_seq 2020-11-04 20:55:49 +01:00
strings.c
super.c ceph: add new RECOVER mount_state when recovering session 2020-12-14 23:21:46 +01:00
super.h ceph: add status debugfs file 2020-12-14 23:21:47 +01:00
util.c ceph: move net/ceph/ceph_fs.c to fs/ceph/util.c 2020-01-27 16:53:40 +01:00
xattr.c ceph: add ceph.{cluster_fsid/client_id} vxattrs 2020-12-14 23:21:47 +01:00