]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: avoid panic in create_session_open_msg() if utsname() returns NULL
authorYan, Zheng <zyan@redhat.com>
Mon, 11 Sep 2017 04:10:08 +0000 (12:10 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 19 Sep 2017 19:04:52 +0000 (21:04 +0200)
commitfd6af5f13c8889541255826095d113b496fe5d8f
treefa76387b54e5903ff8fba0f5cfdebc58e24b125a
parent260a0da775d43c1a2e82bc2e9f6abd8fbf11a3ff
ceph: avoid panic in create_session_open_msg() if utsname() returns NULL

utsname() can return NULL while process is exiting. Kernel releases
file locks during process exits. We send request to mds when releasing
file lock. So it's possible that we open mds session while process is
exiting. utsname() is called in create_session_open_msg().

Link: http://tracker.ceph.com/issues/21275
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
[idryomov@gmail.com: drop utsname.h include from mds_client.c]
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/mds_client.c
fs/ceph/mds_client.h