Patchwork sparc64: Fix bootup crash on sun4v.

login
register
mail settings
Submitter David Miller
Date April 13, 2012, 7:01 p.m.
Message ID <20120413.150126.895680397991364654.davem@davemloft.net>
Download mbox | patch
Permalink /patch/152384/
State Accepted
Delegated to: David Miller
Headers show

Comments

David Miller - April 13, 2012, 7:01 p.m.
The DS driver registers as a subsys_initcall() but this can be too
early, in particular this risks registering before we've had a chance
to allocate and setup module_kset in kernel/params.c which is
performed also as a subsyts_initcall().

Register DS using device_initcall() insteal.

Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: stable@vger.kernel.org
---
 arch/sparc/kernel/ds.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Sam Ravnborg - April 13, 2012, 9:41 p.m.
On Fri, Apr 13, 2012 at 03:01:26PM -0400, David Miller wrote:
> 
> 
> Register DS using device_initcall() insteal.
> 
> -subsys_initcall(ds_init);
> +fs_initcall(ds_init);

Changelog and patch does not match?!?

	Sam
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - April 13, 2012, 9:53 p.m.
From: Sam Ravnborg <sam@ravnborg.org>
Date: Fri, 13 Apr 2012 23:41:36 +0200

> On Fri, Apr 13, 2012 at 03:01:26PM -0400, David Miller wrote:
>> 
>> 
>> Register DS using device_initcall() insteal.
>> 
>> -subsys_initcall(ds_init);
>> +fs_initcall(ds_init);
> 
> Changelog and patch does not match?!?

Grrr... good catch.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c
index fea13c7..b93c2c9 100644
--- a/arch/sparc/kernel/ds.c
+++ b/arch/sparc/kernel/ds.c
@@ -1264,4 +1264,4 @@  static int __init ds_init(void)
 	return vio_register_driver(&ds_driver);
 }
 
-subsys_initcall(ds_init);
+fs_initcall(ds_init);