From: William Lee Irwin III <wli@holomorphy.com>
To: Matthew Dobson <colpatch@us.ibm.com>
Cc: Linus Torvalds <torvalds@transmeta.com>,
Trivial Patch Monkey <trivial@rustcorp.com.au>,
linux-kernel@vger.kernel.org
Subject: Re: [patch] fix broken topology functions
Date: Wed, 4 Dec 2002 16:20:23 -0800 [thread overview]
Message-ID: <20021205002023.GC9882@holomorphy.com> (raw)
In-Reply-To: <3DEE959F.7080600@us.ibm.com>
On Wed, Dec 04, 2002 at 03:54:07PM -0800, Matthew Dobson wrote:
> Linus,
> The register_(node|memblk)_driver functions are broken. Pat Mochel
> recently updated sysfs to make sure that when you register a driver that
> it's associated devclass is already registered. The way node/memblk
> registration is done now is backwards and causes panic's on NUMA
> systems. Please apply this patch to fix it.
> Cheers!
That didn't check the return value of devclass_register():
Reorder devclass_register() and driver_register() so these things
stop oopsing.
memblk.c | 4 ++--
node.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff -urpN mm1-2.5.50/drivers/base/memblk.c mm1-2.5.50-1/drivers/base/memblk.c
--- mm1-2.5.50/drivers/base/memblk.c 2002-11-27 14:36:23.000000000 -0800
+++ mm1-2.5.50-1/drivers/base/memblk.c 2002-12-04 12:53:59.000000000 -0800
@@ -49,7 +49,7 @@ int __init register_memblk(struct memblk
static int __init register_memblk_type(void)
{
- driver_register(&memblk_driver);
- return devclass_register(&memblk_devclass);
+ int error = devclass_register(&memblk_devclass);
+ return error ? error : driver_register(&memblk_driver);
}
postcore_initcall(register_memblk_type);
diff -urpN mm1-2.5.50/drivers/base/node.c mm1-2.5.50-1/drivers/base/node.c
--- mm1-2.5.50/drivers/base/node.c 2002-11-27 14:35:50.000000000 -0800
+++ mm1-2.5.50-1/drivers/base/node.c 2002-12-04 12:53:05.000000000 -0800
@@ -93,7 +93,7 @@ int __init register_node(struct node *no
static int __init register_node_type(void)
{
- driver_register(&node_driver);
- return devclass_register(&node_devclass);
+ int error = devclass_register(&node_devclass);
+ return error ? error : driver_register(&node_driver);
}
postcore_initcall(register_node_type);
next prev parent reply other threads:[~2002-12-05 0:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-04 23:54 [patch] fix broken topology functions Matthew Dobson
2002-12-05 0:20 ` William Lee Irwin III [this message]
2002-12-05 21:35 ` Matthew Dobson
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=20021205002023.GC9882@holomorphy.com \
--to=wli@holomorphy.com \
--cc=colpatch@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
--cc=trivial@rustcorp.com.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 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.