Skip to contentSkip to conversation

cciss: return -EFAULT if copy_from_user() fails

PATCH Applied Miller, Mike (OS Dev) 2 participants 2 messages Jul 31, 2008 – Aug 4, 2008 1 message not in the archive SCSI

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Miller, Mike (OS Dev)

author Acked-by
#1 lore raw
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 -EFAULT if copy_from_user() fails

Quoted 3 lines

Return -EFAULT instead of -ENOMEM if copy_from_user() fails.

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 *ino
                                if
 (ioc->Request.Type.Direction == XFER_WRITE) {
                                        if (copy_from_user
                                            (buff[sg_used],
 data_ptr, sz)) {
-                                               status = -ENOMEM;
+                                               status = -EFAULT;
                                                goto cleanup1;
                                        }
                                } else {
Applied
#2 lore raw
Quoted 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 -EFAULT if copy_from_user() fails

Quoted 5 lines
Quoted 3 lines

Return -EFAULT instead of -ENOMEM if copy_from_user() fails.

Applied

Signature · 1 line
Jens Axboe