2008-07-31 14:13:23

by Mike Miller

[permalink] [raw]
Subject: RE: [PATCH] cciss: return -EFAULT if copy_from_user() fails



> -----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
>
> Return -EFAULT instead of -ENOMEM if copy_from_user() fails.
>
> Signed-off-by: Nikanth Karthikesan <[email protected]>

Acked-by: Mike Miller <[email protected]>

>
> ---
> drivers/block/cciss.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: b/drivers/block/cciss.c
> ===================================================================
> --- a/drivers/block/cciss.c
> +++ b/drivers/block/cciss.c
> @@ -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 {
>


2008-08-04 08:58:27

by Jens Axboe

[permalink] [raw]
Subject: Re: [PATCH] cciss: return -EFAULT if copy_from_user() fails

On Thu, Jul 31 2008, Miller, Mike (OS Dev) wrote:
>
>
> > -----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
> >
> > Return -EFAULT instead of -ENOMEM if copy_from_user() fails.
> >
> > Signed-off-by: Nikanth Karthikesan <[email protected]>
>
> Acked-by: Mike Miller <[email protected]>

Applied

--
Jens Axboe