scsi: fix upper bounds check of sense key in scsi_sense_key_string()
authorTyrel Datwyler <tyreld@linux.vnet.ibm.com>
Fri, 12 Aug 2016 22:20:07 +0000 (17:20 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 16 Aug 2016 04:49:32 +0000 (00:49 -0400)
commita87eeb900dbb9f8202f96604d56e47e67c936b9d
tree504de8af767fbc32dcd8206a755b03544bd44690
parente120dcb6b2a11840b08f0fc0d2e90256b7b6e842
scsi: fix upper bounds check of sense key in scsi_sense_key_string()

Commit 655ee63cf371 ("scsi constants: command, sense key + additional
sense string") added a "Completed" sense string with key 0xF to
snstext[], but failed to updated the upper bounds check of the sense key
in scsi_sense_key_string().

Fixes: 655ee63cf371 ("[SCSI] scsi constants: command, sense key + additional sense strings")
Cc: <stable@vger.kernel.org> # v3.12+
Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/constants.c