From: Wang Weidong <wangweidong1@huawei.com>
To: Vlad Yasevich <vyasevich@gmail.com>,
Neil Horman <nhorman@tuxdriver.com>,
David Miller <davem@davemloft.net>
Cc: linux-sctp@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH] sctp: loading sctp when load sctp_probe
Date: Thu, 12 Dec 2013 12:32:36 +0000 [thread overview]
Message-ID: <52A9ACE4.3080506@huawei.com> (raw)
when I modprobe sctp_probe, it failed with "FATAL: ". I found that
sctp should load before sctp_probe register jprobe. So I add a
sctp_setup_jprobe for loading 'sctp' when first failed to register
jprobe, just do this similar to dccp_probe.
Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
---
net/sctp/probe.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/net/sctp/probe.c b/net/sctp/probe.c
index 53c452e..cd9565a 100644
--- a/net/sctp/probe.c
+++ b/net/sctp/probe.c
@@ -182,6 +182,17 @@ static struct jprobe sctp_recv_probe = {
.entry = jsctp_sf_eat_sack,
};
+static __init int sctp_setup_jprobe(void)
+{
+ int ret = register_jprobe(&sctp_recv_probe);
+
+ if (ret) {
+ request_module("sctp");
+ ret = register_jprobe(&sctp_recv_probe);
+ }
+ return ret;
+}
+
static __init int sctpprobe_init(void)
{
int ret = -ENOMEM;
@@ -202,7 +213,7 @@ static __init int sctpprobe_init(void)
&sctpprobe_fops))
goto free_kfifo;
- ret = register_jprobe(&sctp_recv_probe);
+ ret = sctp_setup_jprobe();
if (ret)
goto remove_proc;
--
1.7.12
WARNING: multiple messages have this Message-ID (diff)
From: Wang Weidong <wangweidong1@huawei.com>
To: Vlad Yasevich <vyasevich@gmail.com>,
Neil Horman <nhorman@tuxdriver.com>,
David Miller <davem@davemloft.net>
Cc: <linux-sctp@vger.kernel.org>, <netdev@vger.kernel.org>
Subject: [PATCH] sctp: loading sctp when load sctp_probe
Date: Thu, 12 Dec 2013 20:32:36 +0800 [thread overview]
Message-ID: <52A9ACE4.3080506@huawei.com> (raw)
when I modprobe sctp_probe, it failed with "FATAL: ". I found that
sctp should load before sctp_probe register jprobe. So I add a
sctp_setup_jprobe for loading 'sctp' when first failed to register
jprobe, just do this similar to dccp_probe.
Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
---
net/sctp/probe.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/net/sctp/probe.c b/net/sctp/probe.c
index 53c452e..cd9565a 100644
--- a/net/sctp/probe.c
+++ b/net/sctp/probe.c
@@ -182,6 +182,17 @@ static struct jprobe sctp_recv_probe = {
.entry = jsctp_sf_eat_sack,
};
+static __init int sctp_setup_jprobe(void)
+{
+ int ret = register_jprobe(&sctp_recv_probe);
+
+ if (ret) {
+ request_module("sctp");
+ ret = register_jprobe(&sctp_recv_probe);
+ }
+ return ret;
+}
+
static __init int sctpprobe_init(void)
{
int ret = -ENOMEM;
@@ -202,7 +213,7 @@ static __init int sctpprobe_init(void)
&sctpprobe_fops))
goto free_kfifo;
- ret = register_jprobe(&sctp_recv_probe);
+ ret = sctp_setup_jprobe();
if (ret)
goto remove_proc;
--
1.7.12
next reply other threads:[~2013-12-12 12:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-12 12:32 Wang Weidong [this message]
2013-12-12 12:32 ` [PATCH] sctp: loading sctp when load sctp_probe Wang Weidong
2013-12-12 13:54 ` Neil Horman
2013-12-12 13:54 ` Neil Horman
2013-12-12 14:58 ` Wang Weidong
2013-12-12 14:58 ` Wang Weidong
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=52A9ACE4.3080506@huawei.com \
--to=wangweidong1@huawei.com \
--cc=davem@davemloft.net \
--cc=linux-sctp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=vyasevich@gmail.com \
/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.