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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 12 Sep 2016 18:08:01 -0400
From:   Jamal Hadi Salim <jhs@...atatu.com>
To:     Eric Dumazet <eric.dumazet@...il.com>
Cc:     davem@...emloft.net, netdev@...r.kernel.org,
        xiyou.wangcong@...il.com, daniel@...earbox.net,
        john.r.fastabend@...el.com
Subject: Re: [PATCH v4 net-next 1/1] net_sched: Introduce skbmod action

On 16-09-12 05:58 PM, Eric Dumazet wrote:
> On Mon, 2016-09-12 at 16:46 -0400, Jamal Hadi Salim wrote:
>> From: Jamal Hadi Salim <jhs@...atatu.com>
>
>> +
>> +	/* XXX: if you are going to edit more fields beyond ethernet header
>> +	 * (example when you add IP header replacement or vlan swap)
>> +	 * then MAX_EDIT_LEN needs to change appropriately
>> +	*/
>> +	err = skb_ensure_writable(skb, ETH_HLEN);
>> +	if (unlikely(err)) /* best policy is to drop on the floor */
>> +		action = TC_ACT_SHOT;
>> +
>> +	rcu_read_lock();
>> +	action = READ_ONCE(d->tcf_action);
>
> You are overwriting @action, while you might have put TC_ACT_SHOT in it
> 3 lines above.
>
> Maybe you meant :
> 	if (err)
> 		return TC_ACT_SHOT;
>

Thanks for catching that (leftover from when i used a lock).
Will resubmit.

cheers,
jamal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ