Commit e47bd709 authored by Dan Carpenter's avatar Dan Carpenter Committed by sanglipeng
Browse files

ceph: fix off by one bugs in unsafe_request_wait()

stable inclusion
from stable-v5.10.157
commit 38993788f40c78c64ff68aa68877ca6cbeac05a1
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7MU59

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=38993788f40c78c64ff68aa68877ca6cbeac05a1



--------------------------------

[ Upstream commit 708c8716 ]

The "> max" tests should be ">= max" to prevent an out of bounds access
on the next lines.

Fixes: e1a4541e ("ceph: flush the mdlog before waiting on unsafe reqs")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarIlya Dryomov <idryomov@gmail.com>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
Stable-dep-of: 5bd76b8d ("ceph: fix NULL pointer dereference for req->r_session")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent ebf9492c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment