linux-stable/fs/ceph
Ilya Dryomov 4eeddc6229 ceph: canonicalize server path in place
commit b27a939e83 upstream.

syzbot reported that 4fbc0c711b ("ceph: remove the extra slashes in
the server path") had caused a regression where an allocation could be
done under a spinlock -- compare_mount_options() is called by sget_fc()
with sb_lock held.

We don't really need the supplied server path, so canonicalize it
in place and compare it directly.  To make this work, the leading
slash is kept around and the logic in ceph_real_mount() to skip it
is restored.  CEPH_MSG_CLIENT_SESSION now reports the same (i.e.
canonicalized) path, with the leading slash of course.

Fixes: 4fbc0c711b ("ceph: remove the extra slashes in the server path")
Reported-by: syzbot+98704a51af8e3d9425a9@syzkaller.appspotmail.com
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Luis Henriques <lhenriques@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-13 10:45:12 +02:00
..
acl.c ceph: return errors from posix_acl_equiv_mode() correctly 2018-08-02 21:26:12 +02:00
addr.c ceph: clear page dirty before invalidate page 2019-08-29 08:28:50 +02:00
cache.c ceph: use timespec64 for inode timestamp 2018-08-02 21:26:12 +02:00
cache.h
caps.c ceph: fix use-after-free in __ceph_remove_cap() 2019-11-12 19:20:39 +01: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 libceph, ceph: change permission for readonly debugfs entries 2018-04-02 10:12:45 +02:00
dir.c ceph: ensure d_name stability in ceph_dentry_hash() 2019-05-02 09:58:54 +02:00
export.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
file.c ceph: check POOL_FLAG_FULL/NEARFULL in addition to OSDMAP_FULL/NEARFULL 2020-04-02 15:28:16 +02:00
inode.c ceph: fix dentry leak in ceph_readdir_prepopulate 2019-12-01 09:16:48 +01:00
ioctl.c libceph, ceph: move ceph_calc_file_object_mapping() to striper.c 2018-04-02 10:12:43 +02: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 fs/*/Kconfig: drop links to 404-compliant http://acl.bestbits.at 2018-01-01 12:45:37 -07:00
locks.c ceph: don't try fill file_lock on unsuccessful GETFILELOCK reply 2019-08-29 08:28:50 +02:00
Makefile ceph: quota: add initial infrastructure to support cephfs quotas 2018-04-02 11:17:51 +02:00
mds_client.c ceph: check availability of mds cluster on mount after wait timeout 2020-02-24 08:34:52 +01:00
mds_client.h ceph: support cephfs' own feature bits 2018-08-13 17:55:44 +02: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
quota.c ceph: quota: fix null pointer dereference in quota check 2018-11-27 16:13:05 +01:00
snap.c ceph: fix buffer free while holding i_ceph_lock in __ceph_build_xattrs_blob() 2019-09-10 10:33:52 +01: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:45:12 +02:00
super.h ceph: canonicalize server path in place 2020-04-13 10:45:12 +02:00
xattr.c ceph: fix "ceph.dir.rctime" vxattr value 2020-01-27 14:51:00 +01:00