3.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: "Stephen M. Cameron" <scameron@xxxxxxxxxxxxxxxxxx> commit 0758f4f732b08b6ef07f2e5f735655cf69fea477 upstream. When copy_from_user fails, return -EFAULT, not -ENOMEM Signed-off-by: Stephen M. Cameron <scameron@xxxxxxxxxxxxxxxxxx> Reported-by: Robert Elliott <elliott@xxxxxx> Reviewed-by: Joe Handzik <joseph.t.handzik@xxxxxx> Reviewed-by: Scott Teel <scott.teel@xxxxxx> Reviewed by: Mike MIller <michael.miller@xxxxxxxxxxxxx> Signed-off-by: Christoph Hellwig <hch@xxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/scsi/hpsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -3131,7 +3131,7 @@ static int hpsa_big_passthru_ioctl(struc } if (ioc->Request.Type.Direction == XFER_WRITE) { if (copy_from_user(buff[sg_used], data_ptr, sz)) { - status = -ENOMEM; + status = -EFAULT; goto cleanup1; } } else -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html