[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20150912225609.161382637@1wt.eu>
Date: Sun, 13 Sep 2015 00:57:06 +0200
From: Willy Tarreau <w@....eu>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Gerrit Renker <gerrit@....abdn.ac.uk>,
Wang Weidong <wangweidong1@...wei.com>,
"David S. Miller" <davem@...emloft.net>, Willy Tarreau <w@....eu>
Subject: [PATCH 2.6.32 60/62] dccp: catch failed request_module call in dccp_probe
init
2.6.32-longterm review patch. If anyone has any objections, please let me know.
------------------
From: Wang Weidong <wangweidong1@...wei.com>
Check the return value of request_module during dccp_probe initialisation,
bail out if that call fails.
Signed-off-by: Gerrit Renker <gerrit@....abdn.ac.uk>
Signed-off-by: Wang Weidong <wangweidong1@...wei.com>
Signed-off-by: David S. Miller <davem@...emloft.net>
(cherry picked from commit 965cdea825693c821d200e38fac9402cde6dce6a)
Signed-off-by: Willy Tarreau <w@....eu>
---
net/dccp/probe.c | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/net/dccp/probe.c b/net/dccp/probe.c
index 89f25cb..1610810 100644
--- a/net/dccp/probe.c
+++ b/net/dccp/probe.c
@@ -151,17 +151,6 @@ static const struct file_operations dccpprobe_fops = {
.read = dccpprobe_read,
};
-static __init int setup_jprobe(void)
-{
- int ret = register_jprobe(&dccp_send_probe);
-
- if (ret) {
- request_module("dccp");
- ret = register_jprobe(&dccp_send_probe);
- }
- return ret;
-}
-
static __init int dccpprobe_init(void)
{
int ret = -ENOMEM;
@@ -175,7 +164,13 @@ static __init int dccpprobe_init(void)
if (!proc_net_fops_create(&init_net, procname, S_IRUSR, &dccpprobe_fops))
goto err0;
- ret = setup_jprobe();
+ ret = register_jprobe(&dccp_send_probe);
+ if (ret) {
+ ret = request_module("dccp");
+ if (!ret)
+ ret = register_jprobe(&dccp_send_probe);
+ }
+
if (ret)
goto err1;
--
1.7.12.2.21.g234cd45.dirty
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists