]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: fix off-by-one LUN check in scsi_scan_host_selected()
authorMark Knibbs <markk@clara.co.uk>
Thu, 9 Oct 2014 11:39:48 +0000 (12:39 +0100)
committerChristoph Hellwig <hch@lst.de>
Wed, 12 Nov 2014 10:15:53 +0000 (11:15 +0100)
commit7e554b2af331526fd9710be4320bcfaaadc2274e
tree65a47a5d21f530f0836e77ce0ec880ac009b1583
parentfe08a12dc48479ecd70eeb6cb73aa56e37ea867e
scsi: fix off-by-one LUN check in scsi_scan_host_selected()

The Scsi_Host structure max_lun field is the maximum allowed LUN plus 1. So
a LUN value is invalid if >= max_lun.

Signed-off-by: Mark Knibbs <markk@clara.co.uk>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/scsi_scan.c