* [PATCH] sysfs: Initialised pci bus legacy_mem field before use
@ 2010-03-10 22:48 Mel Gorman
2010-03-10 23:04 ` Mel Gorman
0 siblings, 1 reply; 2+ messages in thread
From: Mel Gorman @ 2010-03-10 22:48 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Stephen Rothwell, Benjamin Herrenschmidt, Eric W. Biederman,
Andrew Morton, linux-kernel
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>
---
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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] sysfs: Initialised pci bus legacy_mem field before use
2010-03-10 22:48 [PATCH] sysfs: Initialised pci bus legacy_mem field before use Mel Gorman
@ 2010-03-10 23:04 ` Mel Gorman
0 siblings, 0 replies; 2+ messages in thread
From: Mel Gorman @ 2010-03-10 23:04 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Stephen Rothwell, Benjamin Herrenschmidt, Eric W. Biederman,
Andrew Morton, linux-kernel
On Wed, Mar 10, 2010 at 10:48:34PM +0000, Mel Gorman wrote:
> 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.
>
I forgot to point out that triggering this problem depends on
CONFIG_DEBUG_LOCK_ALLOC which is why it probably slipped through
testing.
> Signed-off-by: Mel Gorman <mel@csn.ul.ie>
> ---
> 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;
--
Mel Gorman
Part-time Phd Student Linux Technology Center
University of Limerick IBM Dublin Software Lab
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-10 23:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-10 22:48 [PATCH] sysfs: Initialised pci bus legacy_mem field before use Mel Gorman
2010-03-10 23:04 ` Mel Gorman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®