All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@suse.de>
To: linux-kernel@vger.kernel.org
Cc: Mel Gorman <mel@csn.ul.ie>, Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 02/12] sysfs: Initialised pci bus legacy_mem field before use
Date: Fri, 19 Mar 2010 08:18:45 -0700	[thread overview]
Message-ID: <1269011935-8886-2-git-send-email-gregkh@suse.de> (raw)
In-Reply-To: <20100319151311.GA8541@kroah.com>

From: Mel Gorman <mel@csn.ul.ie>

PPC64 is failing to boot the latest mmotm due to an uninitialised pointer in
pci_create_legacy_files(). The surprise is that machines boot at all and it
would appear to affect current mainline as well.  This patch fixes the problem.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/pci/pci-sysfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index de29645..9976685 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -655,8 +655,8 @@ void pci_create_legacy_files(struct pci_bus *b)
 		goto legacy_io_err;
 
 	/* Allocated above after the legacy_io struct */
-	sysfs_bin_attr_init(b->legacy_mem);
 	b->legacy_mem = b->legacy_io + 1;
+	sysfs_bin_attr_init(b->legacy_mem);
 	b->legacy_mem->attr.name = "legacy_mem";
 	b->legacy_mem->size = 1024*1024;
 	b->legacy_mem->attr.mode = S_IRUSR | S_IWUSR;
-- 
1.7.0.2


  parent reply	other threads:[~2010-03-19 15:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-19 15:13 [GIT PATCH] driver core fixes for 2.6.34-git Greg KH
2010-03-19 15:18 ` [PATCH 01/12] sysfs: use sysfs_bin_attr_init in firmware class driver Greg Kroah-Hartman
2010-03-19 15:18 ` Greg Kroah-Hartman [this message]
2010-03-19 15:18 ` [PATCH 03/12] sysfs: fix sysfs lockdep warning in ipmi code Greg Kroah-Hartman
2010-03-19 15:18 ` [PATCH 04/12] sysfs: fix sysfs lockdep warning in infiniband code Greg Kroah-Hartman
2010-03-19 15:18 ` [PATCH 05/12] sysfs: fix sysfs lockdep warning in mlx4 code Greg Kroah-Hartman
2010-03-19 15:18 ` [PATCH 06/12] Driver core: Early platform kernel-doc update Greg Kroah-Hartman
2010-03-19 15:18 ` [PATCH 07/12] driver-core: fix missing kernel-doc in firmware_class Greg Kroah-Hartman
2010-03-19 15:18 ` [PATCH 08/12] kobject: documentation: Fix erroneous example in kobject doc Greg Kroah-Hartman
2010-03-19 15:18 ` [PATCH 09/12] sysdev: the cpu probe/release attributes should be sysdev_class_attributes Greg Kroah-Hartman
2010-03-19 15:18 ` [PATCH 10/12] kobject: documentation: Update to refer to kset-example.c Greg Kroah-Hartman
2010-03-19 15:18 ` [PATCH 11/12] driver-core: document ERR_PTR() return values Greg Kroah-Hartman
2010-03-19 15:18 ` [PATCH 12/12] driver core: numa: fix BUILD_BUG_ON for node_read_distance Greg Kroah-Hartman

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=1269011935-8886-2-git-send-email-gregkh@suse.de \
    --to=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mel@csn.ul.ie \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.