Skip to content

Commit 29ca3cd

Browse files
atenartdavem330
authored andcommitted
net: macsec: fix rtnl locking issue
netdev_update_features() must be called with the rtnl lock taken. Not doing so triggers a warning, as ASSERT_RTNL() is used in __netdev_update_features(), the first function called by netdev_update_features(). Fix this. Fixes: c850240 ("net: macsec: report real_dev features when HW offloading is enabled") Signed-off-by: Antoine Tenart <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 722c0f0 commit 29ca3cd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/macsec.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2641,11 +2641,12 @@ static int macsec_upd_offload(struct sk_buff *skb, struct genl_info *info)
26412641
if (ret)
26422642
goto rollback;
26432643

2644-
rtnl_unlock();
26452644
/* Force features update, since they are different for SW MACSec and
26462645
* HW offloading cases.
26472646
*/
26482647
netdev_update_features(dev);
2648+
2649+
rtnl_unlock();
26492650
return 0;
26502651

26512652
rollback:

0 commit comments

Comments
 (0)