mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-22 00:40:03 +00:00
net: Check CHANGEUPPER notifier return value
switchdev drivers reflect the newly requested topology to hardware when CHANGEUPPER is received, after software links were already formed. However, the operation can fail and user will not be notified, as the return value of the notifier is not checked. Add this check and rollback software links if necessary. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
3b195843f5
commit
b03804e7c3
1 changed files with 6 additions and 2 deletions
|
@ -5490,8 +5490,12 @@ static int __netdev_upper_dev_link(struct net_device *dev,
|
|||
goto rollback_lower_mesh;
|
||||
}
|
||||
|
||||
call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev,
|
||||
&changeupper_info.info);
|
||||
ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev,
|
||||
&changeupper_info.info);
|
||||
ret = notifier_to_errno(ret);
|
||||
if (ret)
|
||||
goto rollback_lower_mesh;
|
||||
|
||||
return 0;
|
||||
|
||||
rollback_lower_mesh:
|
||||
|
|
Loading…
Reference in a new issue