public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz
Cc: kay.sievers@vrfy.org
Subject: [PATCH] PCI: memset rom attribute before using it
Date: Thu, 3 Feb 2005 09:40:21 -0800	[thread overview]
Message-ID: <11074524213464@kroah.com> (raw)
In-Reply-To: <11074524211780@kroah.com>

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


  reply	other threads:[~2005-02-03 18:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-03 17:32 [BK PATCH] PCI fixes for 2.6.11-rc3 Greg KH
2005-02-03 17:40 ` [PATCH] PCI: typo in pci_scan_bus_parented Greg KH
2005-02-03 17:40   ` [PATCH] pci: Add Citrine quirk Greg KH
2005-02-03 17:40     ` Greg KH [this message]
2005-02-03 17:40       ` [PATCH] PCI Hotplug: remove incorrect rpaphp firmware dependency Greg KH
2005-02-03 17:40         ` [PATCH] PCI: add linux-pci mailing list to PCI maintainers entry Greg KH
2005-02-03 17:40           ` [PATCH] PCI: change sysfs representation of PCI-E devices Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11074524213464@kroah.com \
    --to=greg@kroah.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox