mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 22:51:42 +00:00
[SCSI] Wrong size information for devices with disabled read access
When accessing a device with disabled read access the capacity is set randomly to 1GB. This makes it impossible to userspace tools to detect invalid device capacities. Signed-off-by: Mike Anderson <andmike@us.ibm.com> Acked-by: Chris Mason <mason@suse.com> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
parent
01dfc7fc56
commit
69bdd88ca2
@ -1215,7 +1215,7 @@ repeat:
|
||||
/* Either no media are present but the drive didn't tell us,
|
||||
or they are present but the read capacity command fails */
|
||||
/* sdkp->media_present = 0; -- not always correct */
|
||||
sdkp->capacity = 0x200000; /* 1 GB - random */
|
||||
sdkp->capacity = 0; /* unknown mapped to zero - as usual */
|
||||
|
||||
return;
|
||||
} else if (the_result && longrc) {
|
||||
|
Loading…
Reference in New Issue
Block a user