ceph: fix NULL pointer dereference for req->r_session
authorXiubo Li <xiubli@redhat.com>
Thu, 10 Nov 2022 13:01:59 +0000 (21:01 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 14 Nov 2022 09:29:05 +0000 (10:29 +0100)
commit5bd76b8de5b74fa941a6eafee87728a0fe072267
treebcb686d9170f0f480a07b97a995ab4514ec80eb1
parent51884d153f7ec85e18d607b2467820a90e0f4359
ceph: fix NULL pointer dereference for req->r_session

The request's r_session maybe changed when it was forwarded or
resent. Both the forwarding and resending cases the requests will
be protected by the mdsc->mutex.

Cc: stable@vger.kernel.org
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2137955
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/caps.c