Commit 49ed6573 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 402168ce 2fc2111c
...@@ -455,6 +455,7 @@ static void idedisk_prepare_flush(struct request_queue *q, struct request *rq) ...@@ -455,6 +455,7 @@ static void idedisk_prepare_flush(struct request_queue *q, struct request *rq)
rq->cmd_type = REQ_TYPE_ATA_TASKFILE; rq->cmd_type = REQ_TYPE_ATA_TASKFILE;
rq->special = cmd; rq->special = cmd;
cmd->rq = rq;
} }
ide_devset_get(multcount, mult_count); ide_devset_get(multcount, mult_count);
......
...@@ -1064,6 +1064,7 @@ static int idetape_blkdev_ioctl(ide_drive_t *drive, unsigned int cmd, ...@@ -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; tape->best_dsc_rw_freq = config.dsc_rw_frequency;
break; break;
case 0x0350: case 0x0350:
memset(&config, 0, sizeof(config));
config.dsc_rw_frequency = (int) tape->best_dsc_rw_freq; config.dsc_rw_frequency = (int) tape->best_dsc_rw_freq;
config.nr_stages = 1; config.nr_stages = 1;
if (copy_to_user(argp, &config, sizeof(config))) if (copy_to_user(argp, &config, sizeof(config)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment