From: Mel Gorman <mel@csn.ul.ie>
To: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sysfs: Initialised pci bus legacy_mem field before use
Date: Wed, 10 Mar 2010 23:04:35 +0000 [thread overview]
Message-ID: <20100310230435.GC14715@csn.ul.ie> (raw)
In-Reply-To: <20100310224834.GB14715@csn.ul.ie>
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
prev parent reply other threads:[~2010-03-10 23:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-10 22:48 Mel Gorman
2010-03-10 23:04 ` Mel Gorman [this message]
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=20100310230435.GC14715@csn.ul.ie \
--to=mel@csn.ul.ie \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=ebiederm@xmission.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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
all inboxes | Powered by JetHome®