linux-stable/fs/ceph
Xiubo Li e329f6f77b ceph: fix incorrect revoked caps assert in ceph_fill_file_size()
commit 15c0a870dc upstream.

When truncating the inode the MDS will acquire the xlock for the
ifile Locker, which will revoke the 'Frwsxl' caps from the clients.
But when the client just releases and flushes the 'Fw' caps to MDS,
for exmaple, and once the MDS receives the caps flushing msg it
just thought the revocation has finished. Then the MDS will continue
truncating the inode and then issued the truncate notification to
all the clients. While just before the clients receives the cap
flushing ack they receive the truncation notification, the clients
will detecte that the 'issued | dirty' is still holding the 'Fw'
caps.

Cc: stable@vger.kernel.org
Link: https://tracker.ceph.com/issues/56693
Fixes: b0d7c22310 ("ceph: introduce i_truncate_mutex")
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-25 11:13:30 +02:00
..
acl.c ceph: unify inode i_ctime update 2017-06-14 19:37:23 +02:00
addr.c ceph: remove bogus checks and WARN_ONs from ceph_set_page_dirty 2021-07-20 16:17:52 +02:00
cache.c The highlights include: 2017-09-12 20:03:53 -07:00
cache.h ceph: improve fscache revalidation 2016-06-01 10:31:50 +02:00
caps.c ceph: fix use-after-free bug for inodes when flushing capsnaps 2023-06-14 10:35:26 +02:00
ceph_frag.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
debugfs.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dir.c ceph: ensure d_name stability in ceph_dentry_hash() 2019-05-02 09:40:29 +02:00
export.c ceph: return ceph_mdsc_do_request() errors from __get_parent() 2020-05-02 17:24:13 +02:00
file.c ceph: don't truncate file in atomic_open 2022-10-26 13:16:53 +02:00
inode.c ceph: fix incorrect revoked caps assert in ceph_fill_file_size() 2023-10-25 11:13:30 +02:00
ioctl.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ioctl.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig
locks.c ceph: don't try fill file_lock on unsuccessful GETFILELOCK reply 2019-08-29 08:26:42 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mds_client.c ceph: fix potential mdsc use-after-free crash 2020-09-03 11:22:27 +02:00
mds_client.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mdsmap.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
snap.c ceph: fix use-after-free bug for inodes when flushing capsnaps 2023-06-14 10:35:26 +02:00
strings.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
super.c ceph: canonicalize server path in place 2020-04-13 10:34:35 +02:00
super.h ceph: canonicalize server path in place 2020-04-13 10:34:35 +02:00
xattr.c ceph: fix buffer free while holding i_ceph_lock in __ceph_build_xattrs_blob() 2019-09-10 10:32:18 +01:00