Commit b03804e7 authored by Ido Schimmel's avatar Ido Schimmel Committed by David S. Miller

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: default avatarIdo Schimmel <>
Signed-off-by: default avatarJiri Pirko <>
Signed-off-by: default avatarDavid S. Miller <>
parent 3b195843
......@@ -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,
ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev,
ret = notifier_to_errno(ret);
if (ret)
goto rollback_lower_mesh;
return 0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment