Dan Carpenter 59a5e266c3 libata: array underflow in ata_find_dev()
My static checker complains that "devno" can be negative, meaning that
we read before the start of the loop.  I've looked at the code, and I
think the warning is right.  This come from /proc so it's root only or
it would be quite a quite a serious bug.  The call tree looks like this:

proc_scsi_write() <- gets id and channel from simple_strtoul()
-> scsi_add_single_device() <- calls shost->transportt->user_scan()
   -> ata_scsi_user_scan()
      -> ata_find_dev()

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: stable@vger.kernel.org # all versions at this point
2017-07-19 10:31:51 -04:00
..
2017-07-07 09:44:06 -07:00
2017-07-07 09:44:06 -07:00
2017-07-09 18:48:37 -07:00
2017-07-04 14:37:25 -07:00
2017-07-04 14:47:47 -07:00
2017-07-04 14:47:47 -07:00
2017-07-07 13:55:45 -07:00
2017-07-08 12:36:50 -07:00
2017-07-09 18:48:37 -07:00
2017-07-03 20:27:48 -07:00
2017-07-04 14:28:22 -07:00
2017-07-06 12:10:33 -07:00
2017-07-03 20:55:59 -07:00
2017-07-03 20:55:59 -07:00
2017-07-04 11:48:27 -07:00
2017-07-05 17:09:27 -07:00
2017-07-06 11:32:40 -07:00
2017-07-09 18:48:37 -07:00
2017-07-04 14:47:47 -07:00
2017-07-07 13:55:45 -07:00
2017-07-08 15:51:57 -07:00
2017-07-01 14:30:39 -07:00
2017-06-19 14:24:41 -04:00
2017-07-07 09:44:06 -07:00
2017-07-08 15:51:57 -07:00
2017-07-08 15:51:57 -07:00
2017-07-05 21:46:42 +02:00
2017-07-08 15:51:57 -07:00
2017-07-05 17:09:27 -07:00
2017-07-04 14:47:47 -07:00
2017-07-06 15:38:31 -07:00
2017-07-07 09:44:06 -07:00
2017-07-06 12:10:33 -07:00
2017-07-04 14:47:47 -07:00
2017-07-06 11:15:19 -07:00
2017-07-07 13:42:04 -07:00
2017-07-03 20:27:48 -07:00
2017-07-09 18:48:37 -07:00