diff options
| author | Hari Mishal <harimishal1@gmail.com> | 2026-07-09 14:30:33 +0200 |
|---|---|---|
| committer | Keith Busch <kbusch@kernel.org> | 2026-07-14 15:12:16 -0700 |
| commit | 29261f8bb41662f2a660c479e5cf592942b53f78 (patch) | |
| tree | 44082cfe722235b8a812e02e23d00b70e00aba9b /tools/perf/scripts/python/stackcollapse.py | |
| parent | 3c568b35a0d309acb40746552bec2af24cd550ef (diff) | |
nvme: clamp FDP nruhsd to allocated RUH status descriptor count
nvme_query_fdp_info() allocates the RUH status buffer for at most S8_MAX
- 1 descriptors, and then copies ruhs->ruhsd[] into head->plids[] using
the controller reported ruhs->nruhsd directly as the loop bound.
However, that count wasn't taken into account for the actual buffer's
size, so there was a chance for a controller reporting a larger nruhsd
to cause the copy to overflow the buffer. Clamp nr_plids to the same
bound used for the allocation.
Assisted-by: gkh_clanker_t1000
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Hari Mishal <harimishal1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
