2.6.32-longterm review patch. If anyone has any objections, please let me know.
------------------ From: Wang Weidong <wangweido...@huawei.com> Check the return value of request_module during dccp_probe initialisation, bail out if that call fails. Signed-off-by: Gerrit Renker <ger...@erg.abdn.ac.uk> Signed-off-by: Wang Weidong <wangweido...@huawei.com> Signed-off-by: David S. Miller <da...@davemloft.net> (cherry picked from commit 965cdea825693c821d200e38fac9402cde6dce6a) Signed-off-by: Willy Tarreau <w...@1wt.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 stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html