mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 09:14:07 -04:00
Merge tag 'ceph-for-5.15-rc3' of git://github.com/ceph/ceph-client
Pull ceph fix from Ilya Dryomov: "A fix for a potential array out of bounds access from Dan" * tag 'ceph-for-5.15-rc3' of git://github.com/ceph/ceph-client: ceph: fix off by one bugs in unsafe_request_wait()
This commit is contained in:
@@ -2263,7 +2263,7 @@ static int unsafe_request_wait(struct inode *inode)
|
||||
list_for_each_entry(req, &ci->i_unsafe_dirops,
|
||||
r_unsafe_dir_item) {
|
||||
s = req->r_session;
|
||||
if (unlikely(s->s_mds > max)) {
|
||||
if (unlikely(s->s_mds >= max)) {
|
||||
spin_unlock(&ci->i_unsafe_lock);
|
||||
goto retry;
|
||||
}
|
||||
@@ -2277,7 +2277,7 @@ static int unsafe_request_wait(struct inode *inode)
|
||||
list_for_each_entry(req, &ci->i_unsafe_iops,
|
||||
r_unsafe_target_item) {
|
||||
s = req->r_session;
|
||||
if (unlikely(s->s_mds > max)) {
|
||||
if (unlikely(s->s_mds >= max)) {
|
||||
spin_unlock(&ci->i_unsafe_lock);
|
||||
goto retry;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user