]> git.baikalelectronics.ru Git - kernel.git/commit
rps: flow_dissector: Fix uninitialized flow_keys used in __skb_get_hash possibly
authorGao Feng <fgao@ikuai8.com>
Wed, 31 Aug 2016 06:15:05 +0000 (14:15 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Sep 2016 05:45:03 +0000 (22:45 -0700)
commit1ca2c627960dfccbc6cc7ed38ece80f946bc33af
tree836a3ec0989ac301c54c800a08331d7b2a48b1da
parente7cf7036c8085e818c6f39ae41c49b2a60935e2f
rps: flow_dissector: Fix uninitialized flow_keys used in __skb_get_hash possibly

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: 5d4b5856cc9e ("flow_dissector: Ignore flow dissector return value from ___skb_get_hash")
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Gao Feng <fgao@ikuai8.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/flow_dissector.c