]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: handle zero-length feature mask in session messages
authorJeff Layton <jlayton@kernel.org>
Tue, 4 Aug 2020 16:31:56 +0000 (12:31 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 5 Aug 2020 15:47:07 +0000 (17:47 +0200)
commitae4c0e857e708c488bb0623f1bde487c16dddd0c
tree115edaa75ee9b1084e7665b742a947a5b011fc3b
parent094badded02cc93d182b79579e56f78eb96c7b26
ceph: handle zero-length feature mask in session messages

Most session messages contain a feature mask, but the MDS will
routinely send a REJECT message with one that is zero-length.

Commit 3af9bbbd50ab ("ceph: fix endianness bug when handling MDS
session feature bits") fixed the decoding of the feature mask,
but failed to account for the MDS sending a zero-length feature
mask. This causes REJECT message decoding to fail.

Skip trying to decode a feature mask if the word count is zero.

Cc: stable@vger.kernel.org
URL: https://tracker.ceph.com/issues/46823
Fixes: 3af9bbbd50ab ("ceph: fix endianness bug when handling MDS session feature bits")
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Tested-by: Patrick Donnelly <pdonnell@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/mds_client.c