Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 226884
b: refs/heads/master
c: 5c10007
h: refs/heads/master
v: v3
  • Loading branch information
Julia Lawall authored and James Bottomley committed Dec 31, 2010
1 parent 27f0464 commit 5d87582
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8f4bfadd200477acb6dcf41a45919dd37d01a6db
refs/heads/master: 5c10007560589a2335a77cbc92347b1474518296
4 changes: 3 additions & 1 deletion trunk/drivers/scsi/gdth.c
Original file line number Diff line number Diff line change
Expand Up @@ -4273,8 +4273,10 @@ static int ioc_general(void __user *arg, char *cmnd)
}

rval = __gdth_execute(ha->sdev, &gen.command, cmnd, gen.timeout, &gen.info);
if (rval < 0)
if (rval < 0) {
gdth_ioctl_free(ha, gen.data_len+gen.sense_len, buf, paddr);
return rval;
}
gen.status = rval;

if (copy_to_user(arg + sizeof(gdth_ioctl_general), buf,
Expand Down
16 changes: 12 additions & 4 deletions trunk/drivers/scsi/gdth_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,10 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length,
len = 0;
begin = pos;
}
if (pos > offset + length)
if (pos > offset + length) {
gdth_ioctl_free(ha, GDTH_SCRATCH, buf, paddr);
goto stop_output;
}
}
}
gdth_ioctl_free(ha, GDTH_SCRATCH, buf, paddr);
Expand Down Expand Up @@ -450,8 +452,10 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length,
len = 0;
begin = pos;
}
if (pos > offset + length)
if (pos > offset + length) {
gdth_ioctl_free(ha, GDTH_SCRATCH, buf, paddr);
goto stop_output;
}
} while (drv_no != -1);

if (is_mirr) {
Expand All @@ -472,8 +476,10 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length,
len = 0;
begin = pos;
}
if (pos > offset + length)
if (pos > offset + length) {
gdth_ioctl_free(ha, GDTH_SCRATCH, buf, paddr);
goto stop_output;
}
}
gdth_ioctl_free(ha, GDTH_SCRATCH, buf, paddr);

Expand Down Expand Up @@ -542,8 +548,10 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length,
len = 0;
begin = pos;
}
if (pos > offset + length)
if (pos > offset + length) {
gdth_ioctl_free(ha, GDTH_SCRATCH, buf, paddr);
goto stop_output;
}
}
}
gdth_ioctl_free(ha, GDTH_SCRATCH, buf, paddr);
Expand Down

0 comments on commit 5d87582

Please sign in to comment.