diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-22 09:50:18 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-22 09:50:18 -0700 |
commit | 49ed657356121c2a8fa1f5c2ab38496b95f6fe6a (patch) | |
tree | 40c491ec701672fd5bf04933c2480d5d806dba4f | |
parent | 402168cee1a0b791c54c54a68ae21bb26880f40b (diff) | |
parent | 2fc2111c2729462b99b6e37f39a48917054776f5 (diff) | |
download | linux-49ed657356121c2a8fa1f5c2ab38496b95f6fe6a.tar.bz2 |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6:
ide-tape: Don't leak kernel stack information
ide: fix memory leak when flush command is issued
-rw-r--r-- | drivers/ide/ide-disk.c | 1 | ||||
-rw-r--r-- | drivers/ide/ide-tape.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index 695181120cdb..7f878017b736 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c @@ -455,6 +455,7 @@ static void idedisk_prepare_flush(struct request_queue *q, struct request *rq) rq->cmd_type = REQ_TYPE_ATA_TASKFILE; rq->special = cmd; + cmd->rq = rq; } ide_devset_get(multcount, mult_count); diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 013dc595fab6..bc5fb12b913c 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c @@ -1064,6 +1064,7 @@ static int idetape_blkdev_ioctl(ide_drive_t *drive, unsigned int cmd, tape->best_dsc_rw_freq = config.dsc_rw_frequency; break; case 0x0350: + memset(&config, 0, sizeof(config)); config.dsc_rw_frequency = (int) tape->best_dsc_rw_freq; config.nr_stages = 1; if (copy_to_user(argp, &config, sizeof(config))) |