Files
twx-linux/drivers/scsi
Martin K. Petersen b689dfbed8 scsi: sd: Fix capacity calculation with 32-bit sector_t
commit 7c856152cb 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
…
…
…
…
…
…
2016-07-27 09:47:39 -07:00
…
…
…
…
…
…
…
…
2015-12-03 09:32:33 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-11-09 17:11:57 -08:00
…
…
2015-11-09 16:32:14 -08: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-12-03 09:32:33 -08: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
…
2015-12-03 09:32:33 -08:00
…
2015-11-09 17:42:19 -08:00
…
…
…
…
…
…
…
…
…
…