cciss: return -EFAULT if copy_from_user() fails
A message that is not in the archive (sent off-list or not yet received): [email protected]
Miller, Mike (OS Dev)
Acked-byQuoted 9 lines
-----Original Message-----
From: Nikanth Karthikesan [mailto:[email protected]]
Sent: Thursday, July 31, 2008 1:06 AM
To: Miller, Mike (OS Dev)
Cc: ISS StorageDev; Jens Axboe
Subject: [PATCH] cciss: return-EFAULTifcopy_from_user()fails
Quoted 3 lines
Return
-EFAULTinstead of-ENOMEMifcopy_from_user()fails.Signed-off-by Nikanth Karthikesan <[email protected]>
Quoted 21 lines
--- drivers/block/cciss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Index:
b/drivers/block/cciss.c
===================================================================drivers/block/cciss.c +1
-1@@ -1134,7 +1134,7 @@ static int cciss_ioctl(struct inode *inoif (ioc->Request.Type.Direction ==XFER_WRITE ) {if (copy_from_user (buff[sg_used], data_ptr, sz)) { - status = -ENOMEM ; + status = -EFAULT ; goto cleanup1;} } else {
Jens Axboe
AppliedQuoted 9 lines · Mike (OS Dev)
Quoted 9 lines
-----Original Message-----
From: Nikanth Karthikesan [mailto:[email protected]]
Sent: Thursday, July 31, 2008 1:06 AM
To: Miller, Mike (OS Dev)
Cc: ISS StorageDev; Jens Axboe
Subject: [PATCH] cciss: return-EFAULTifcopy_from_user()fails
Quoted 5 lines
Quoted 3 lines
Return
-EFAULTinstead of-ENOMEMifcopy_from_user()fails.Signed-off-by Nikanth Karthikesan <[email protected]>Acked-by Mike Miller <[email protected]>
Applied
Signature · 1 line
Jens Axboe