[3.13.y.z extended stable] Patch "hpsa: fix bad -ENOMEM return value in hpsa_big_passthru_ioctl" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Mon Sep 15 22:07:42 UTC 2014


This is a note to let you know that I have just added a patch titled

    hpsa: fix bad -ENOMEM return value in hpsa_big_passthru_ioctl

to the linux-3.13.y-queue branch of the 3.13.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.13.y-queue

This patch is scheduled to be released in version 3.13.11.7.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.13.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

------

>From 0a9d791f8189a117c4956028ce6ea9da9b7f9784 Mon Sep 17 00:00:00 2001
From: "Stephen M. Cameron" <scameron at beardog.cce.hp.com>
Date: Thu, 3 Jul 2014 10:18:03 -0500
Subject: hpsa: fix bad -ENOMEM return value in hpsa_big_passthru_ioctl

commit 0758f4f732b08b6ef07f2e5f735655cf69fea477 upstream.

When copy_from_user fails, return -EFAULT, not -ENOMEM

Signed-off-by: Stephen M. Cameron <scameron at beardog.cce.hp.com>
Reported-by: Robert Elliott <elliott at hp.com>
Reviewed-by: Joe Handzik <joseph.t.handzik at hp.com>
Reviewed-by: Scott Teel <scott.teel at hp.com>
Reviewed by: Mike MIller <michael.miller at canonical.com>
Signed-off-by: Christoph Hellwig <hch at lst.de>

Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 drivers/scsi/hpsa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index ad034ab..d518bba 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -3151,7 +3151,7 @@ static int hpsa_big_passthru_ioctl(struct ctlr_info *h, void __user *argp)
 		}
 		if (ioc->Request.Type.Direction == XFER_WRITE) {
 			if (copy_from_user(buff[sg_used], data_ptr, sz)) {
-				status = -ENOMEM;
+				status = -EFAULT;
 				goto cleanup1;
 			}
 		} else
--
1.9.1





More information about the kernel-team mailing list