* [PATCH net] net: macsec: fix rtnl locking issue
@ 2020-05-06 13:58 Antoine Tenart
2020-05-06 21:50 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Antoine Tenart @ 2020-05-06 13:58 UTC (permalink / raw)
To: davem; +Cc: Antoine Tenart, sd, mstarovoitov, netdev, linux-kernel
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: c850240b6c41 ("net: macsec: report real_dev features when HW offloading is enabled")
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
---
drivers/net/macsec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c
index d4034025c87c..d0d31cb99180 100644
--- a/drivers/net/macsec.c
+++ b/drivers/net/macsec.c
@@ -2641,11 +2641,12 @@ static int macsec_upd_offload(struct sk_buff *skb, struct genl_info *info)
if (ret)
goto rollback;
- rtnl_unlock();
/* Force features update, since they are different for SW MACSec and
* HW offloading cases.
*/
netdev_update_features(dev);
+
+ rtnl_unlock();
return 0;
rollback:
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] net: macsec: fix rtnl locking issue
2020-05-06 13:58 [PATCH net] net: macsec: fix rtnl locking issue Antoine Tenart
@ 2020-05-06 21:50 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-05-06 21:50 UTC (permalink / raw)
To: antoine.tenart; +Cc: sd, mstarovoitov, netdev, linux-kernel
From: Antoine Tenart <antoine.tenart@bootlin.com>
Date: Wed, 6 May 2020 15:58:30 +0200
> 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: c850240b6c41 ("net: macsec: report real_dev features when HW offloading is enabled")
> Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Applied, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-06 21:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-06 13:58 [PATCH net] net: macsec: fix rtnl locking issue Antoine Tenart
2020-05-06 21:50 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).