Commit 7c501ddc authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Linus Torvalds

[PATCH] zero 'hw_regs_t hw' allocated from stack in ide.c and ide-cs.c

parent 1b803805
...@@ -1574,6 +1574,7 @@ int generic_ide_ioctl(struct block_device *bdev, unsigned int cmd, ...@@ -1574,6 +1574,7 @@ int generic_ide_ioctl(struct block_device *bdev, unsigned int cmd,
if (!capable(CAP_SYS_RAWIO)) return -EACCES; if (!capable(CAP_SYS_RAWIO)) return -EACCES;
if (copy_from_user(args, (void *)arg, 3 * sizeof(int))) if (copy_from_user(args, (void *)arg, 3 * sizeof(int)))
return -EFAULT; return -EFAULT;
memset(&hw, 0, sizeof(hw));
ide_init_hwif_ports(&hw, (unsigned long) args[0], ide_init_hwif_ports(&hw, (unsigned long) args[0],
(unsigned long) args[1], NULL); (unsigned long) args[1], NULL);
hw.irq = args[2]; hw.irq = args[2];
......
...@@ -213,6 +213,7 @@ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) ...@@ -213,6 +213,7 @@ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
static int idecs_register(unsigned long io, unsigned long ctl, unsigned long irq) static int idecs_register(unsigned long io, unsigned long ctl, unsigned long irq)
{ {
hw_regs_t hw; hw_regs_t hw;
memset(&hw, 0, sizeof(hw));
ide_init_hwif_ports(&hw, io, ctl, NULL); ide_init_hwif_ports(&hw, io, ctl, NULL);
hw.irq = irq; hw.irq = irq;
hw.chipset = ide_pci; hw.chipset = ide_pci;
......
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