Re: [PATCH v2 net] rps: flow_dissector: Fix uninitialized flow_keys used in __skb_get_hash possibly

From: David Miller
Date: Fri Sep 02 2016 - 01:48:46 EST


From: fgao@xxxxxxxxxx
Date: Wed, 31 Aug 2016 14:15:05 +0800

> From: Gao Feng <fgao@xxxxxxxxxx>
>
> The original codes depend on that the function parameters are evaluated from
> left to right. But the parameter's evaluation order is not defined in C
> standard actually.
>
> When flow_keys_have_l4(&keys) is invoked before ___skb_get_hash(skb, &keys,
> hashrnd) with some compilers or environment, the keys passed to
> flow_keys_have_l4 is not initialized.
>
> Fixes: 6db61d79c1e1 ("flow_dissector: Ignore flow dissector return value from ___skb_get_hash")
>
> Acked-by: Eric Dumazet <edumazet@xxxxxxxxxx>
> Signed-off-by: Gao Feng <fgao@xxxxxxxxxx>

Applied.