* [PATCH net-next] Revert "vlan: move dev_put into vlan_dev_uninit"
@ 2022-02-23 4:54 Xin Long
2022-02-23 23:30 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Xin Long @ 2022-02-23 4:54 UTC (permalink / raw)
To: network dev; +Cc: davem, kuba, Eric Dumazet, william.xuanziyang
This reverts commit d6ff94afd90b0ce8d1715f8ef77d4347d7a7f2c0.
Since commit faab39f63c1f ("net: allow out-of-order netdev unregistration")
fixed the issue in a better way, this patch is to revert the previous fix,
as it might bring back the old problem fixed by commit 563bcbae3ba2 ("net:
vlan: fix a UAF in vlan_dev_real_dev()").
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
net/8021q/vlan_dev.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index d1902828a18a..e5d23e75572a 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -638,12 +638,7 @@ void vlan_dev_free_egress_priority(const struct net_device *dev)
static void vlan_dev_uninit(struct net_device *dev)
{
- struct vlan_dev_priv *vlan = vlan_dev_priv(dev);
-
vlan_dev_free_egress_priority(dev);
-
- /* Get rid of the vlan's reference to real_dev */
- dev_put_track(vlan->real_dev, &vlan->dev_tracker);
}
static netdev_features_t vlan_dev_fix_features(struct net_device *dev,
@@ -856,6 +851,9 @@ static void vlan_dev_free(struct net_device *dev)
free_percpu(vlan->vlan_pcpu_stats);
vlan->vlan_pcpu_stats = NULL;
+
+ /* Get rid of the vlan's reference to real_dev */
+ dev_put_track(vlan->real_dev, &vlan->dev_tracker);
}
void vlan_setup(struct net_device *dev)
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] Revert "vlan: move dev_put into vlan_dev_uninit"
2022-02-23 4:54 [PATCH net-next] Revert "vlan: move dev_put into vlan_dev_uninit" Xin Long
@ 2022-02-23 23:30 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-02-23 23:30 UTC (permalink / raw)
To: Xin Long; +Cc: netdev, davem, kuba, edumazet, william.xuanziyang
Hello:
This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 22 Feb 2022 23:54:57 -0500 you wrote:
> This reverts commit d6ff94afd90b0ce8d1715f8ef77d4347d7a7f2c0.
>
> Since commit faab39f63c1f ("net: allow out-of-order netdev unregistration")
> fixed the issue in a better way, this patch is to revert the previous fix,
> as it might bring back the old problem fixed by commit 563bcbae3ba2 ("net:
> vlan: fix a UAF in vlan_dev_real_dev()").
>
> [...]
Here is the summary with links:
- [net-next] Revert "vlan: move dev_put into vlan_dev_uninit"
https://git.kernel.org/netdev/net-next/c/6a47cdc38143
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-23 23:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-23 4:54 [PATCH net-next] Revert "vlan: move dev_put into vlan_dev_uninit" Xin Long
2022-02-23 23:30 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.