提交 0758f4f7 编写于 作者: S Stephen M. Cameron 提交者: Christoph Hellwig

hpsa: fix bad -ENOMEM return value in hpsa_big_passthru_ioctl

When copy_from_user fails, return -EFAULT, not -ENOMEM
Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com>
Reported-by: NRobert Elliott <elliott@hp.com>
Reviewed-by: NJoe Handzik <joseph.t.handzik@hp.com>
Reviewed-by: NScott Teel <scott.teel@hp.com>
Reviewed by: Mike MIller <michael.miller@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: NChristoph Hellwig <hch@lst.de>
上级 d1fea47c
......@@ -5093,7 +5093,7 @@ static int hpsa_big_passthru_ioctl(struct ctlr_info *h, void __user *argp)
}
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.
先完成此消息的编辑!
想要评论请 注册