mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] PCI: memset rom attribute before using it
@ 2005-02-03 17:40 Greg KH
  2005-02-03 17:40 ` [PATCH] PCI Hotplug: remove incorrect rpaphp firmware dependency Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2005-02-03 17:40 UTC (permalink / raw)
  To: linux-kernel, linux-pci; +Cc: kay.sievers

ChangeSet 1.2043, 2005/02/03 00:40:37-08:00, kay.sievers@vrfy.org

[PATCH] PCI: memset rom attribute before using it

Initialize the allocated bin_attribute structure, otherwise unused fields
are pointing to random places.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>


 drivers/pci/pci-sysfs.c |    1 +
 1 files changed, 1 insertion(+)


diff -Nru a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
--- a/drivers/pci/pci-sysfs.c	2005-02-03 09:28:46 -08:00
+++ b/drivers/pci/pci-sysfs.c	2005-02-03 09:28:46 -08:00
@@ -436,6 +436,7 @@
 		
 		rom_attr = kmalloc(sizeof(*rom_attr), GFP_ATOMIC);
 		if (rom_attr) {
+			memset(rom_attr, 0x00, sizeof(*rom_attr));
 			pdev->rom_attr = rom_attr;
 			rom_attr->size = pci_resource_len(pdev, PCI_ROM_RESOURCE);
 			rom_attr->attr.name = "rom";


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-02-08  0:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200502031908.j13J8ggb031915@hera.kernel.org>
2005-02-07 17:00 ` [PATCH] PCI Hotplug: remove incorrect rpaphp firmware dependency David Woodhouse
2005-02-07 17:41   ` John Rose
2005-02-07 17:45     ` John Rose
2005-02-07 19:13       ` Andrew Morton
2005-02-07 19:28     ` David Woodhouse
2005-02-08  0:21   ` John Rose
2005-02-03 17:40 [PATCH] PCI: memset rom attribute before using it Greg KH
2005-02-03 17:40 ` [PATCH] PCI Hotplug: remove incorrect rpaphp firmware dependency Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®