summaryrefslogtreecommitdiffstats
path: root/net/sctp/probe.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2014-01-12 17:56:29 +0100
committerIngo Molnar <mingo@kernel.org>2014-01-12 17:56:29 +0100
commitda4540757d35a98a350d6e8d882a64b2d04f8581 (patch)
treead77d8752f5db40497c819f051cbae12effb8163 /net/sctp/probe.c
parentcc131eef1cec905b9bdb0be6d7ab3af86f23de98 (diff)
parent7e22e91102c6b9df7c4ae2168910e19d2bb14cd6 (diff)
Merge tag 'v3.13-rc8' into x86/ras, to pick up fixes.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/sctp/probe.c')
-rw-r--r--net/sctp/probe.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/net/sctp/probe.c b/net/sctp/probe.c
index 53c452efb40..5e68b94ee64 100644
--- a/net/sctp/probe.c
+++ b/net/sctp/probe.c
@@ -38,6 +38,7 @@
#include <net/sctp/sctp.h>
#include <net/sctp/sm.h>
+MODULE_SOFTDEP("pre: sctp");
MODULE_AUTHOR("Wei Yongjun <yjwei@cn.fujitsu.com>");
MODULE_DESCRIPTION("SCTP snooper");
MODULE_LICENSE("GPL");
@@ -182,6 +183,20 @@ 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) {
+ if (request_module("sctp"))
+ goto out;
+ ret = register_jprobe(&sctp_recv_probe);
+ }
+
+out:
+ return ret;
+}
+
static __init int sctpprobe_init(void)
{
int ret = -ENOMEM;
@@ -202,7 +217,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;