Skip to content

Commit

Permalink
Merge branch 'bonding-team-basic-dev-needed_headroom-support'
Browse files Browse the repository at this point in the history
Eric Dumazet says:

====================
bonding/team: basic dev->needed_headroom support

Both bonding and team drivers support non-ethernet devices,
but missed proper dev->needed_headroom initializations.

syzbot found a crash caused by bonding, I mirrored the fix in team as well.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Sep 26, 2020
2 parents 4663ff6 + 89d0174 commit dc171dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1315,6 +1315,7 @@ static void bond_setup_by_slave(struct net_device *bond_dev,

bond_dev->type = slave_dev->type;
bond_dev->hard_header_len = slave_dev->hard_header_len;
bond_dev->needed_headroom = slave_dev->needed_headroom;
bond_dev->addr_len = slave_dev->addr_len;

memcpy(bond_dev->broadcast, slave_dev->broadcast,
Expand Down
1 change: 1 addition & 0 deletions drivers/net/team/team.c
Original file line number Diff line number Diff line change
Expand Up @@ -2112,6 +2112,7 @@ static void team_setup_by_port(struct net_device *dev,
dev->header_ops = port_dev->header_ops;
dev->type = port_dev->type;
dev->hard_header_len = port_dev->hard_header_len;
dev->needed_headroom = port_dev->needed_headroom;
dev->addr_len = port_dev->addr_len;
dev->mtu = port_dev->mtu;
memcpy(dev->broadcast, port_dev->broadcast, port_dev->addr_len);
Expand Down

0 comments on commit dc171dc

Please sign in to comment.