projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
time: Fix overflow when HZ is smaller than 60
[platform/adaptation/renesas_rcar/renesas_kernel.git]
/
block
/
scsi_ioctl.c
diff --git
a/block/scsi_ioctl.c
b/block/scsi_ioctl.c
index
625e3e4
..
2648797
100644
(file)
--- a/
block/scsi_ioctl.c
+++ b/
block/scsi_ioctl.c
@@
-323,12
+323,14
@@
static int sg_io(struct request_queue *q, struct gendisk *bd_disk,
if (hdr->iovec_count) {
size_t iov_data_len;
if (hdr->iovec_count) {
size_t iov_data_len;
- struct iovec *iov;
+ struct iovec *iov
= NULL
;
ret = rw_copy_check_uvector(-1, hdr->dxferp, hdr->iovec_count,
0, NULL, &iov);
ret = rw_copy_check_uvector(-1, hdr->dxferp, hdr->iovec_count,
0, NULL, &iov);
- if (ret < 0)
+ if (ret < 0) {
+ kfree(iov);
goto out;
goto out;
+ }
iov_data_len = ret;
ret = 0;
iov_data_len = ret;
ret = 0;