Files
linux/drivers/scsi
Martin K. Petersen b689dfbed8 scsi: sd: Fix capacity calculation with 32-bit sector_t
commit 7c856152cb92f8eee2df29ef325a1b1f43161aff upstream.

We previously made sure that the reported disk capacity was less than
0xffffffff blocks when the kernel was not compiled with large sector_t
support (CONFIG_LBDAF). However, this check assumed that the capacity
was reported in units of 512 bytes.

Add a sanity check function to ensure that we only enable disks if the
entire reported capacity can be expressed in terms of sector_t.

Reported-by: Steve Magnani <steve.magnani@digidescorp.com>
Cc: Bart Van Assche <Bart.VanAssche@sandisk.com>
Reviewed-by: Bart Van Assche <Bart.VanAssche@sandisk.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-21 09:30:05 +02:00
..
2016-04-12 09:08:39 -07:00
2015-11-09 17:11:57 -08:00
2015-11-09 17:11:57 -08:00
2015-11-12 07:06:18 -05:00
2017-04-08 09:53:31 +02:00
2017-03-18 19:09:58 +08:00
2015-11-12 07:06:18 -05:00
2015-11-12 07:06:18 -05:00
2015-04-27 10:10:19 -07:00
2015-04-27 10:04:39 -07:00
2015-04-27 10:04:39 -07:00
2015-04-27 10:05:55 -07:00
2015-04-27 10:05:55 -07:00
2016-07-27 09:47:39 -07:00
2015-12-03 09:32:33 -08:00
2015-04-17 10:13:56 -07:00
2014-11-20 09:11:11 +01:00
2015-07-31 13:31:10 +02:00
2014-11-20 09:11:10 +01:00
2014-11-20 09:11:10 +01:00
2015-11-09 17:11:57 -08:00
2014-11-24 16:13:16 +01:00
2015-11-09 16:32:14 -08:00
2014-11-20 09:11:10 +01:00
2015-12-03 09:32:33 -08:00
2015-11-09 12:39:28 -05:00
2015-11-09 12:39:28 -05:00
2015-11-09 19:32:41 -05:00
2015-06-02 17:24:54 -07:00
2015-12-03 09:32:33 -08:00
2014-11-24 20:01:28 +01:00
2014-11-20 09:11:10 +01:00
2014-11-20 09:11:10 +01:00
2015-11-12 07:06:18 -05:00
2016-10-28 03:01:31 -04:00
2015-11-09 17:11:57 -08:00
2017-04-21 09:30:05 +02:00
2014-11-12 11:15:57 +01:00
2015-12-03 09:32:33 -08:00
2015-06-02 08:03:25 -07:00
2015-11-09 17:42:19 -08:00
2014-11-20 09:11:15 +01:00
2014-11-20 09:11:10 +01:00
2014-11-20 09:11:10 +01:00