From: Johannes Berg <johannes@sipsolutions.net>
To: Nicolas Cavallari <Nicolas.Cavallari@lri.fr>
Cc: "Luis R. Rodriguez" <mcgrof@kernel.org>,
Maximilian.Gmeiner.sam04@fh-joanneum.at,
linux-wireless@vger.kernel.org, linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] compat: Fix module_init return type from void to int.
Date: Tue, 06 Mar 2012 11:09:35 +0100 [thread overview]
Message-ID: <1331028575.3447.5.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1331027728-18496-1-git-send-email-cavallar@lri.fr> (sfid-20120306_105836_618222_61A5ED9C)
On Tue, 2012-03-06 at 10:55 +0100, Nicolas Cavallari wrote:
> 086f3a1 overrode module_init to make it depend on compat, but the
> overriding module_init has return type 'void', so strange things would
> happen when the module loading code see that init_module() returns
> positive values. This patch makes it return the value returned by
> the overriden module_init.
>
> Signed-off-by: Nicolas Cavallari <cavallar@lri.fr>
> ---
> On 05/03/2012 22:50, Gmeiner Maximilian wrote:
> > After compiling from the bleeding-edge without any errors this is what I get in kern.log when doing modprobe ath9k
>
> I had the same problem with a completely different architecture and device,
> and this patch fixed it.
>
> diff --git a/include/linux/compat-2.6.h b/include/linux/compat-2.6.h
> index bb00cd4..5715ce5 100644
> --- a/include/linux/compat-2.6.h
> +++ b/include/linux/compat-2.6.h
> @@ -27,10 +27,10 @@ void compat_dependency_symbol(void);
>
> #undef module_init
> #define module_init(initfn) \
> - static void __init __init_compat(void) \
> + static int __init __init_compat(void) \
> { \
> compat_dependency_symbol(); \
> - initfn(); \
> + return initfn(); \
Yikes, you're right, thanks for the patch!
Acked-by: Johannes Berg <johannes@sipsolutions.net>
johannes
next prev parent reply other threads:[~2012-03-06 10:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-05 21:50 Compat-Wireless Kernel Bug Report Gmeiner Maximilian
2012-03-06 9:55 ` [PATCH] compat: Fix module_init return type from void to int Nicolas Cavallari
2012-03-06 10:09 ` Johannes Berg [this message]
2012-03-06 17:20 ` Luis R. Rodriguez
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=1331028575.3447.5.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=Maximilian.Gmeiner.sam04@fh-joanneum.at \
--cc=Nicolas.Cavallari@lri.fr \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mcgrof@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).