]> git.baikalelectronics.ru Git - kernel.git/commit
net: macsec: fix net device access prior to holding a lock
authorEmeel Hakim <ehakim@nvidia.com>
Sun, 11 Dec 2022 07:55:32 +0000 (09:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:53 +0000 (13:32 +0100)
commit5ee3143a892dcc5abd3a75367aac6bc689b39712
tree7727165a88b92660943a48ffedb2fbf2cd94e99b
parent8ce9d89026869097c19b31e53fd3ff8a826ff300
net: macsec: fix net device access prior to holding a lock

[ Upstream commit 6948e8493756bd0036aba3f523a8a29ed4849270 ]

Currently macsec offload selection update routine accesses
the net device prior to holding the relevant lock.
Fix by holding the lock prior to the device access.

Fixes: f78edd6a87dc ("net: macsec: add nla support for changing the offloading selection")
Reviewed-by: Raed Salem <raeds@nvidia.com>
Signed-off-by: Emeel Hakim <ehakim@nvidia.com>
Link: https://lore.kernel.org/r/20221211075532.28099-1-ehakim@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/macsec.c