diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-08-26 17:25:45 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-08-29 00:30:23 -0400 |
commit | 0b498a52778368ff501557d68c7b50878ab1701e (patch) | |
tree | 1288212b68e9e981fa7ea21656aaf13d75ed3ee5 /net/rds/rds_single_path.h | |
parent | f9dc70744dc74bc9e128d579f2bc85eb7c0ad8ce (diff) |
net_sched: fix use of uninitialized ethertype variable in cls_flower
The addition of VLAN support caused a possible use of uninitialized
data if we encounter a zero TCA_FLOWER_KEY_ETH_TYPE key, as pointed
out by "gcc -Wmaybe-uninitialized":
net/sched/cls_flower.c: In function 'fl_change':
net/sched/cls_flower.c:366:22: error: 'ethertype' may be used uninitialized in this function [-Werror=maybe-uninitialized]
This changes the code to only set the ethertype field if it
was nonzero, as before the patch.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 9399ae9a6cb2 ("net_sched: flower: Add vlan support")
Cc: Hadar Hen Zion <hadarh@mellanox.com>
Cc: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/rds_single_path.h')
0 files changed, 0 insertions, 0 deletions