Commit 2c361c9b authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'ceph-for-7.0-rc4' of https://github.com/ceph/ceph-client

Pull ceph fixes from Ilya Dryomov:
 "A small pile of CephFS and messenger bug fixes, all marked for stable"

* tag 'ceph-for-7.0-rc4' of https://github.com/ceph/ceph-client:
  libceph: Fix potential out-of-bounds access in ceph_handle_auth_reply()
  libceph: Use u32 for non-negative values in ceph_monmap_decode()
  MAINTAINERS: update email address of Dongsheng Yang
  libceph: reject preamble if control segment is empty
  libceph: admit message frames only in CEPH_CON_S_OPEN state
  libceph: prevent potential out-of-bounds reads in process_message_header()
  ceph: do not skip the first folio of the next object in writeback
  ceph: fix memory leaks in ceph_mdsc_build_path()
  ceph: add a bunch of missing ceph_path_info initializers
  ceph: fix i_nlink underrun during async unlink
parents 399af662 b282c43e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -21937,7 +21937,7 @@ F: drivers/media/radio/radio-tea5777.c
RADOS BLOCK DEVICE (RBD)
M:	Ilya Dryomov <idryomov@gmail.com>
R:	Dongsheng Yang <dongsheng.yang@easystack.cn>
R:	Dongsheng Yang <dongsheng.yang@linux.dev>
L:	ceph-devel@vger.kernel.org
S:	Supported
W:	http://ceph.com/
+0 −1
Original line number Diff line number Diff line
@@ -1326,7 +1326,6 @@ void ceph_process_folio_batch(struct address_space *mapping,
			continue;
		} else if (rc == -E2BIG) {
			folio_unlock(folio);
			ceph_wbc->fbatch.folios[i] = NULL;
			break;
		}

+2 −2
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ static int mdsc_show(struct seq_file *s, void *p)
		if (req->r_inode) {
			seq_printf(s, " #%llx", ceph_ino(req->r_inode));
		} else if (req->r_dentry) {
			struct ceph_path_info path_info;
			struct ceph_path_info path_info = {0};
			path = ceph_mdsc_build_path(mdsc, req->r_dentry, &path_info, 0);
			if (IS_ERR(path))
				path = NULL;
@@ -98,7 +98,7 @@ static int mdsc_show(struct seq_file *s, void *p)
		}

		if (req->r_old_dentry) {
			struct ceph_path_info path_info;
			struct ceph_path_info path_info = {0};
			path = ceph_mdsc_build_path(mdsc, req->r_old_dentry, &path_info, 0);
			if (IS_ERR(path))
				path = NULL;
+15 −2
Original line number Diff line number Diff line
@@ -1339,6 +1339,7 @@ static int ceph_unlink(struct inode *dir, struct dentry *dentry)
	struct ceph_client *cl = fsc->client;
	struct ceph_mds_client *mdsc = fsc->mdsc;
	struct inode *inode = d_inode(dentry);
	struct ceph_inode_info *ci = ceph_inode(inode);
	struct ceph_mds_request *req;
	bool try_async = ceph_test_mount_opt(fsc, ASYNC_DIROPS);
	struct dentry *dn;
@@ -1363,7 +1364,7 @@ static int ceph_unlink(struct inode *dir, struct dentry *dentry)
	if (!dn) {
		try_async = false;
	} else {
		struct ceph_path_info path_info;
		struct ceph_path_info path_info = {0};
		path = ceph_mdsc_build_path(mdsc, dn, &path_info, 0);
		if (IS_ERR(path)) {
			try_async = false;
@@ -1424,7 +1425,19 @@ static int ceph_unlink(struct inode *dir, struct dentry *dentry)
			 * We have enough caps, so we assume that the unlink
			 * will succeed. Fix up the target inode and dcache.
			 */

			/*
			 * Protect the i_nlink update with i_ceph_lock
			 * to precent racing against ceph_fill_inode()
			 * handling our completion on a worker thread
			 * and don't decrement if i_nlink has already
			 * been updated to zero by this completion.
			 */
			spin_lock(&ci->i_ceph_lock);
			if (inode->i_nlink > 0)
				drop_nlink(inode);
			spin_unlock(&ci->i_ceph_lock);

			d_delete(dentry);
		} else {
			spin_lock(&fsc->async_unlink_conflict_lock);
+2 −2
Original line number Diff line number Diff line
@@ -397,7 +397,7 @@ int ceph_open(struct inode *inode, struct file *file)
	if (!dentry) {
		do_sync = true;
	} else {
		struct ceph_path_info path_info;
		struct ceph_path_info path_info = {0};
		path = ceph_mdsc_build_path(mdsc, dentry, &path_info, 0);
		if (IS_ERR(path)) {
			do_sync = true;
@@ -807,7 +807,7 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
	if (!dn) {
		try_async = false;
	} else {
		struct ceph_path_info path_info;
		struct ceph_path_info path_info = {0};
		path = ceph_mdsc_build_path(mdsc, dn, &path_info, 0);
		if (IS_ERR(path)) {
			try_async = false;
Loading