off-by-one in nvme_get_logpage()
The buffer size field in the GET LOGPAGE command is 0-based, so the driver needs to substract 1 from the calculated buffer size before passing this to the hardware.
This was found on a Samsung SSD, which detected the wrong buffer size and returned an error, which in turn was correctly identified as a programming error in nvme and led to a panic.
Updated by Electric Monk almost 7 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 9898bbdb3aee66342820dd5570925a6ad4783d08 Author: Hans Rosenfeld <firstname.lastname@example.org> Date: 2015-11-19T22:50:35.000Z 6466 off-by-one in nvme_get_logpage() Reviewed by: Dan McDonald <email@example.com> Reviewed by: Toomas Soome <firstname.lastname@example.org> Reviewed by: Garrett D'Amore <email@example.com> Approved by: Robert Mustacchi <firstname.lastname@example.org>