ceph: fix decoding of client session messages flags
authorLuís Henriques <lhenriques@suse.de>
Mon, 23 May 2022 16:09:51 +0000 (17:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:26:30 +0000 (10:26 +0200)
commit7df498a9b70ee4fc04a93e0fe04482903d446c3d
tree60fe9118d91af2670980a4da946155554f724362
parentf81b31d81f9dcf60ebb9f2d9140609427e509516
ceph: fix decoding of client session messages flags

commit ea16567f11018e2f58e72b667b0c803ff92b8153 upstream.

The cephfs kernel client started to show  the message:

 ceph: mds0 session blocklisted

when mounting a filesystem.  This is due to the fact that the session
messages are being incorrectly decoded: the skip needs to take into
account the 'len'.

While there, fixed some whitespaces too.

Cc: stable@vger.kernel.org
Fixes: e1c9788cb397 ("ceph: don't rely on error_string to validate blocklisted session.")
Signed-off-by: Luís Henriques <lhenriques@suse.de>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ceph/mds_client.c