LKML Archive mirror
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: linux-kernel@vger.kernel.org
Cc: "Luis R. Rodriguez" <mcgrof@suse.com>,
	Weilong Chen <chenweilong@huawei.com>,
	Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	"PDate:Wed"@ozlabs.org, 3@ozlabs.org, Feb@ozlabs.org,
	2016@ozlabs.org, "16:55:26"@ozlabs.org, +1030@ozlabs.org,
	Hannes Reinecke <hare@suse.de>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	stable@vger.kernel.org (4.2+),
	Rusty Russell <rusty@rustcorp.com.au>
Subject: [PATCH 1/3] modules: fix modparam async_probe request
Date: Fri,  5 Feb 2016 10:44:11 +1030	[thread overview]
Message-ID: <1454631253-14379-2-git-send-email-rusty@rustcorp.com.au> (raw)
In-Reply-To: <1454631253-14379-1-git-send-email-rusty@rustcorp.com.au>

From: "Luis R. Rodriguez" <mcgrof@suse.com>

Commit f2411da746985 ("driver-core: add driver module
asynchronous probe support") added async probe support,
in two forms:

  * in-kernel driver specification annotation
  * generic async_probe module parameter (modprobe foo async_probe)

To support the generic kernel parameter parse_args() was
extended via commit ecc8617053e0 ("module: add extra
argument for parse_params() callback") however commit
failed to f2411da746985 failed to add the required argument.

This causes a crash then whenever async_probe generic
module parameter is used. This was overlooked when the
form in which in-kernel async probe support was reworked
a bit... Fix this as originally intended.

Cc: Hannes Reinecke <hare@suse.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: stable@vger.kernel.org (4.2+)
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> [minimized]
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
 kernel/module.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/module.c b/kernel/module.c
index 8358f4697c0c..2149f7003e49 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -3496,7 +3496,7 @@ static int load_module(struct load_info *info, const char __user *uargs,
 
 	/* Module is ready to execute: parsing args may do that. */
 	after_dashes = parse_args(mod->name, mod->args, mod->kp, mod->num_kp,
-				  -32768, 32767, NULL,
+				  -32768, 32767, mod,
 				  unknown_module_param_cb);
 	if (IS_ERR(after_dashes)) {
 		err = PTR_ERR(after_dashes);
-- 
2.5.0

  reply	other threads:[~2016-02-05  0:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-05  0:14 [PATCH 0/3] module stable fixes Rusty Russell
2016-02-05  0:14 ` Rusty Russell [this message]
2016-02-05  0:14 ` [PATCH 2/3] module: wrapper for symbol name Rusty Russell
2016-02-05  6:45   ` 平松雅巳 / HIRAMATU,MASAMI
2016-02-05  0:14 ` [PATCH 3/3] modules: fix longstanding /proc/kallsyms vs module insertion race Rusty Russell
2016-02-05  6:41   ` 平松雅巳 / HIRAMATU,MASAMI
2016-02-05  6:51 ` [PATCH 0/3] module stable fixes 平松雅巳 / HIRAMATU,MASAMI

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=1454631253-14379-2-git-send-email-rusty@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc="16:55:26"@ozlabs.org \
    --cc="PDate:Wed"@ozlabs.org \
    --cc=+1030@ozlabs.org \
    --cc=2016@ozlabs.org \
    --cc=3@ozlabs.org \
    --cc=Feb@ozlabs.org \
    --cc=chenweilong@huawei.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hare@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mcgrof@suse.com \
    --cc=stable@vger.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 read-only IMAP folder(s) and NNTP newsgroup(s).