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

From: Kay Sievers
Date: Thu Jan 27 2005 - 15:37:19 EST


On Thu, Jan 27, 2005 at 09:19:23PM +0100, Kay Sievers wrote:
> Initialize the allocated bin_attribute structure, otherwise unused fields
> are pointing to random places.

Sorry, wrong place for the inititalization.

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:31:09 +01:00
@@ -436,6 +436,7 @@ int pci_create_sysfs_dev_files (struct p

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";

-
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/