geneve: fix an uninitialized value in geneve_changelink()
Subsystems (2)
PATCH 1/1 geneve: fix an uninitialized value in geneve_changelink()
geneve_nl2info() sets 'df' conditionally, so we have to initialize it by copying the value from existing geneve device in geneve_changelink().
--- drivers/net/geneve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/geneve.c +1 -1
@@ -1615,11 +1615,11 @@ static int geneve_changelink(struct net_device *dev, struct nlattr *tb[], struct netlink_ext_ack *extack) {struct geneve_dev *geneve =netdev_priv (dev); +enum ifla_geneve_df df = geneve->df;struct geneve_sock *gs4, *gs6;struct ip_tunnel_info info;bool metadata;bool use_udp6_rx_checksums; -enum ifla_geneve_df df;bool ttl_inherit;int err;
Signature · 1 line
2.27.0
Quoted 8 lines · Cong Wang
geneve_nl2info()sets 'df' conditionally, so we have to initialize it by copying the value from existing geneve device ingeneve_changelink().Fixes 56c09de347e4 ("geneve: allow changing DF behavior after creation")Reported-by [email protected]Cc Sabrina Dubroca <[email protected]>Signed-off-by Cong Wang <[email protected]>
Ouch. Thanks for fixing this.
This should only be needed in net/stable. In net-next, I removed this in commit 9e06e8596bc8 (which will conflict with this patch).
Signature · 1 line
Sabrina
David Miller
maintainerFrom: Cong Wang <[email protected]>
Date: Wed, 22 Jul 2020 18:56:25 -0700
Quoted 8 lines
geneve_nl2info()sets 'df' conditionally, so we have to initialize it by copying the value from existing geneve device ingeneve_changelink().Fixes 56c09de347e4 ("geneve: allow changing DF behavior after creation")Reported-by [email protected]Cc Sabrina Dubroca <[email protected]>Signed-off-by Cong Wang <[email protected]>
Applied and queued up for -stable, thanks Cong.