lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141203131815.GF1860@nanopsycho.orion>
Date:	Wed, 3 Dec 2014 14:18:15 +0100
From:	Jiri Pirko <jiri@...nulli.us>
To:	Jamal Hadi Salim <jhs@...atatu.com>
Cc:	netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [patch net-next 6/6] net_sched: cls_cgroup: remove unnecessary if

Wed, Dec 03, 2014 at 02:07:06PM CET, jhs@...atatu.com wrote:
>On 12/02/14 12:00, Jiri Pirko wrote:
>>since head->handle == handle (checked before), just assign handle.
>>
>>Signed-off-by: Jiri Pirko <jiri@...nulli.us>
>>---
>>  net/sched/cls_cgroup.c | 6 +-----
>>  1 file changed, 1 insertion(+), 5 deletions(-)
>>
>>diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c
>>index d61a801..dbee65e 100644
>>--- a/net/sched/cls_cgroup.c
>>+++ b/net/sched/cls_cgroup.c
>>@@ -117,11 +117,7 @@ static int cls_cgroup_change(struct net *net, struct sk_buff *in_skb,
>>  		return -ENOBUFS;
>>
>>  	tcf_exts_init(&new->exts, TCA_CGROUP_ACT, TCA_CGROUP_POLICE);
>>-	if (head)
>>-		new->handle = head->handle;
>>-	else
>>-		new->handle = handle;
>>-
>>+	new->handle = handle;
>
>
>Hrm. head could be NULL, no?

Sure it can. But that is not a problem. Not sure what you are trying to
point at...

>
>cheers,
>jamal
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ