]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
nvme: Sanity check completion id
authorWarner Losh <imp@FreeBSD.org>
Wed, 29 Sep 2021 03:21:50 +0000 (21:21 -0600)
committerAlexander Motin <mav@FreeBSD.org>
Fri, 21 Jan 2022 02:07:30 +0000 (21:07 -0500)
commit1397c8ebb7ef4da83bd2d4fd3a2d4a7725075480
tree9ffefd4f21c5d099d12d4f48a63956df893f0afb
parent86990decd77efbf36ba99d951b4f17688a939bdf
nvme: Sanity check completion id

Make sure the completion ID is in the range of [0..num_trackers) since
the values past the end of the act_tr array are never going to be valid
trackers and will lead to pain and suffering if we try to dereference
them to get the tracker or to set the tracker back to NULL as we
complete the I/O.

Sponsored by: Netflix
Reviewed by: mav, chs, chuck
Differential Revision: https://reviews.freebsd.org/D32088

(cherry picked from commit 36a87d0c6fe9d65de23f177ef84000b205f87e39)
sys/dev/nvme/nvme_qpair.c