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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Nikanth Karthikesan [mailto:knikanth@xxxxxxx]
> 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 <knikanth@xxxxxxx>

Acked-by: Mike Miller <mike.miller@xxxxxx>

>
> ---
>  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 {
>
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux