Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7108f91 authored by Nikanth Karthikesan's avatar Nikanth Karthikesan Committed by Jens Axboe
Browse files

cciss: return -EFAULT if copy_from_user() fails



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

Signed-off-by: default avatarNikanth Karthikesan <knikanth@suse.de>
Acked-by: default avatarMike Miller <mike.miller@hp.com>
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent 0967d61e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1134,7 +1134,7 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
				if (ioc->Request.Type.Direction == XFER_WRITE) {
					if (copy_from_user
					    (buff[sg_used], data_ptr, sz)) {
						status = -ENOMEM;
						status = -EFAULT;
						goto cleanup1;
					}
				} else {