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 about 4 years ago
- % Done changed from 0 to 100
- Status changed from New to Closed
commit 9898bbdb3aee66342820dd5570925a6ad4783d08 Author: Hans Rosenfeld <email@example.com> Date: 2015-11-19T22:50:35.000Z 6466 off-by-one in nvme_get_logpage() Reviewed by: Dan McDonald <firstname.lastname@example.org> Reviewed by: Toomas Soome <email@example.com> Reviewed by: Garrett D'Amore <firstname.lastname@example.org> Approved by: Robert Mustacchi <email@example.com>