[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <lsq.1410438733.613194760@decadent.org.uk>
Date: Thu, 11 Sep 2014 13:32:13 +0100
From: Ben Hutchings <ben@...adent.org.uk>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
CC: akpm@...ux-foundation.org, "Scott Teel" <scott.teel@...com>,
"Robert Elliott" <elliott@...com>,
"Stephen M. Cameron" <scameron@...rdog.cce.hp.com>,
"Joe Handzik" <joseph.t.handzik@...com>,
"Christoph Hellwig" <hch@....de>
Subject: [PATCH 3.2 022/131] hpsa: fix bad -ENOMEM return value in
hpsa_big_passthru_ioctl
3.2.63-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: "Stephen M. Cameron" <scameron@...rdog.cce.hp.com>
commit 0758f4f732b08b6ef07f2e5f735655cf69fea477 upstream.
When copy_from_user fails, return -EFAULT, not -ENOMEM
Signed-off-by: Stephen M. Cameron <scameron@...rdog.cce.hp.com>
Reported-by: Robert Elliott <elliott@...com>
Reviewed-by: Joe Handzik <joseph.t.handzik@...com>
Reviewed-by: Scott Teel <scott.teel@...com>
Reviewed by: Mike MIller <michael.miller@...onical.com>
Signed-off-by: Christoph Hellwig <hch@....de>
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
drivers/scsi/hpsa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -2769,7 +2769,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 linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists