[libata] get-identity ioctl: Fix use of invalid memory pointer
for SAS drivers. Caught by Ke Wei (and team?) at Marvell. Also, move the ata_scsi_ioctl export to libata-scsi.c, as that seems to be the general trend. Acked-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
This commit is contained in:
@@ -4912,7 +4912,7 @@ static int ipr_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)
|
||||
if (res && ipr_is_gata(res)) {
|
||||
if (cmd == HDIO_GET_IDENTITY)
|
||||
return -ENOTTY;
|
||||
return ata_scsi_ioctl(sdev, cmd, arg);
|
||||
return ata_sas_scsi_ioctl(res->sata_port->ap, sdev, cmd, arg);
|
||||
}
|
||||
|
||||
return -EINVAL;
|
||||
|
Reference in New Issue
Block a user