From mel@csn.ul.ie Mon Mar 15 13:42:00 2010 From: Mel Gorman Date: Wed, 10 Mar 2010 22:48:34 +0000 Subject: sysfs: Initialised pci bus legacy_mem field before use To: Greg Kroah-Hartman Cc: Stephen Rothwell , Benjamin Herrenschmidt , "Eric W. Biederman" , Andrew Morton , linux-kernel@vger.kernel.org Message-ID: <20100310224834.GB14715@csn.ul.ie> Content-Disposition: inline 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 Signed-off-by: Greg Kroah-Hartman --- drivers/pci/pci-sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -655,8 +655,8 @@ void pci_create_legacy_files(struct pci_ 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;