netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wang Weidong <wangweidong1@huawei.com>
To: <gerrit@erg.abdn.ac.uk>, David Miller <davem@davemloft.net>
Cc: <dccp@vger.kernel.org>, <netdev@vger.kernel.org>
Subject: [PATCH net-next] dccp: add check request_moduls in setup_jprobe
Date: Tue, 17 Dec 2013 20:30:17 +0800	[thread overview]
Message-ID: <52B043D9.9090808@huawei.com> (raw)

when register_jprobe failed, we will try request_module. But some
time request_module will failed such as the dccp is not exist. so
check the request_module for avoiding do register_jprobe again.

Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
---
 net/dccp/probe.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/dccp/probe.c b/net/dccp/probe.c
index 4c6bdf9..53158d2 100644
--- a/net/dccp/probe.c
+++ b/net/dccp/probe.c
@@ -157,9 +157,12 @@ static __init int setup_jprobe(void)
 	int ret = register_jprobe(&dccp_send_probe);
 
 	if (ret) {
-		request_module("dccp");
+		if (request_module("dccp"))
+			goto out;
 		ret = register_jprobe(&dccp_send_probe);
 	}
+
+out:
 	return ret;
 }
 
-- 
1.7.12

             reply	other threads:[~2013-12-17 12:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-17 12:30 Wang Weidong [this message]
2013-12-18  2:24 ` [PATCH 1/1][net-next] dccp: catch failed request_module call in dccp_probe init (was: [PATCH net-next] dccp: add check request_moduls in setup_jprobe) Gerrit Renker
2013-12-18  2:38   ` [PATCH 1/1][net-next] dccp: catch failed request_module call in dccp_probe init Wang Weidong
2013-12-20  0:26     ` David Miller

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=52B043D9.9090808@huawei.com \
    --to=wangweidong1@huawei.com \
    --cc=davem@davemloft.net \
    --cc=dccp@vger.kernel.org \
    --cc=gerrit@erg.abdn.ac.uk \
    --cc=netdev@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 NNTP newsgroup(s).