From patchwork Tue Dec 17 12:30:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wangweidong X-Patchwork-Id: 302124 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id D23E42C0079 for ; Tue, 17 Dec 2013 23:30:41 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752778Ab3LQMah (ORCPT ); Tue, 17 Dec 2013 07:30:37 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:48632 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751390Ab3LQMag (ORCPT ); Tue, 17 Dec 2013 07:30:36 -0500 Received: from 172.24.2.119 (EHLO szxeml205-edg.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id AHX29155; Tue, 17 Dec 2013 20:30:25 +0800 (CST) Received: from SZXEML452-HUB.china.huawei.com (10.82.67.195) by szxeml205-edg.china.huawei.com (172.24.2.58) with Microsoft SMTP Server (TLS) id 14.3.158.1; Tue, 17 Dec 2013 20:30:22 +0800 Received: from [127.0.0.1] (10.135.68.79) by szxeml452-hub.china.huawei.com (10.82.67.195) with Microsoft SMTP Server id 14.3.158.1; Tue, 17 Dec 2013 20:30:22 +0800 Message-ID: <52B043D9.9090808@huawei.com> Date: Tue, 17 Dec 2013 20:30:17 +0800 From: Wang Weidong User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: , David Miller CC: , Subject: [PATCH net-next] dccp: add check request_moduls in setup_jprobe X-Originating-IP: [10.135.68.79] X-CFilter-Loop: Reflected Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- 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; }