提交 f7108f91 编写于 作者: N Nikanth Karthikesan 提交者: Jens Axboe

cciss: return -EFAULT if copy_from_user() fails

Return -EFAULT instead of -ENOMEM if copy_from_user() fails.
Signed-off-by: NNikanth Karthikesan <knikanth@suse.de>
Acked-by: NMike Miller <mike.miller@hp.com>
Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
上级 0967d61e
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册