Re: [PATCH] sysfs: export the vfs release call of binary attribute

From: Kay Sievers
Date: Thu Jan 27 2005 - 15:22:58 EST


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

Signed-off-by: Kay Sievers <kay.sievers@xxxxxxxx>

===== drivers/pci/pci-sysfs.c 1.16 vs edited =====
--- 1.16/drivers/pci/pci-sysfs.c 2005-01-06 21:30:29 +01:00
+++ edited/drivers/pci/pci-sysfs.c 2005-01-27 21:05:35 +01:00
@@ -435,6 +435,7 @@ int pci_create_sysfs_dev_files (struct p
struct bin_attribute *rom_attr;

rom_attr = kmalloc(sizeof(*rom_attr), GFP_ATOMIC);
+ memset(rom_attr, 0x00, sizeof(*rom_attr));
if (rom_attr) {
pdev->rom_attr = rom_attr;
rom_attr->size = pci_resource_len(pdev, PCI_ROM_RESOURCE);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/