diff options
author | Michael Buesch <mb@bu3sch.de> | 2009-07-19 05:15:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-21 23:36:25 -0400 |
commit | 2fc2111c2729462b99b6e37f39a48917054776f5 (patch) | |
tree | e8803cdde80db3b3d5e8ecd4e0e90579c44a2073 /drivers/ide/ide-tape.c | |
parent | bc146d23d1358af43f03793c3ad8c9f16bbcffcb (diff) |
ide-tape: Don't leak kernel stack information
Don't leak kernel stack information through uninitialized structure members.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Acked-by: Borislav Petkov <petkovbb@gmail.com>.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/ide/ide-tape.c')
-rw-r--r-- | drivers/ide/ide-tape.c | 1 |
1 files changed, 1 insertions, 0 deletions
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, | |||
1064 | tape->best_dsc_rw_freq = config.dsc_rw_frequency; | 1064 | tape->best_dsc_rw_freq = config.dsc_rw_frequency; |
1065 | break; | 1065 | break; |
1066 | case 0x0350: | 1066 | case 0x0350: |
1067 | memset(&config, 0, sizeof(config)); | ||
1067 | config.dsc_rw_frequency = (int) tape->best_dsc_rw_freq; | 1068 | config.dsc_rw_frequency = (int) tape->best_dsc_rw_freq; |
1068 | config.nr_stages = 1; | 1069 | config.nr_stages = 1; |
1069 | if (copy_to_user(argp, &config, sizeof(config))) | 1070 | if (copy_to_user(argp, &config, sizeof(config))) |