mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 08:44:21 +08:00
A fix for a potential array out of bounds access from Dan.
-----BEGIN PGP SIGNATURE----- iQFHBAABCAAxFiEEydHwtzie9C7TfviiSn/eOAIR84sFAmFNudoTHGlkcnlvbW92 QGdtYWlsLmNvbQAKCRBKf944AhHzi93DCACjNadeFDipw3oAkzdAo+wo0MSYgByU 4eu3XN77yTHphc+xoCU/9cCeSkthfNc2XZDktb22lbAX2QxCgvQsWFgck+i0d245 9uQ68IycrUza9PGjLL3okZiLGzqsk97ZDt7vqXT51zN6dgEATVJ5YaXIhVIwAIM0 F6VVcoHruoOPLhPXctQUZusWS+XPzPvU34n2sNodREv9mYeoFmaZJ15wB6UZn2Ps qL6Usoq15EH5cbW60XbqVWFDAhWmCN/6HG3b6w3WtD+lVb2NWTFJOAZGxMVvNo46 1TacgQUVs7iIh+bol3modOT94yVZ4Cvrb0uUMY/oE4AgjVPGxSjHSeMB =7D7F -----END PGP SIGNATURE----- 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:
commit
4c4f0c2bf3
@ -2263,7 +2263,7 @@ retry:
|
||||
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 @@ retry:
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user