]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
dccp: fix auto-loading of dccp(_probe)
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Tue, 2 Feb 2010 20:16:56 +0000 (20:16 +0000)
committerWilly Tarreau <w@1wt.eu>
Fri, 18 Sep 2015 11:52:18 +0000 (13:52 +0200)
commit 1386be55e32a3c5d8ef4a2b243c530a7b664c02c upstream.

This fixes commit (38ff3e6bb987ec583268da8eb22628293095d43b) ("dccp_probe:
Fix module load dependencies between dccp and dccp_probe", from 15 Jan).

It fixes the construction of the first argument of try_then_request_module(),
where only valid return codes from the first argument should be returned.

What we do now is assign the result of register_jprobe() to ret, without
the side effect of the comparison.

Acked-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
net/dccp/probe.c

index 48759983b2db2d16f7495fabf4dbdef68872a102..3ba43b8c7617b0e2a4cbc3cb6ac07cc5cf42fc88 100644 (file)
@@ -164,8 +164,8 @@ static __init int dccpprobe_init(void)
        if (!proc_net_fops_create(&init_net, procname, S_IRUSR, &dccpprobe_fops))
                goto err0;
 
-       ret = try_then_request_module((register_jprobe(&dccp_send_probe) == 0),
-                                       "dccp");
+       try_then_request_module((ret = register_jprobe(&dccp_send_probe)) == 0,
+                               "dccp");
        if (ret)
                goto err1;