Re: [syzbot] [net?] WARNING in cleanup_net (4)

Hillf Danton
2025-02-21T12:17:14Z

On Thu, 20 Feb 2025 05:15:23 -0800
> syzbot found the following issue on:
>
> HEAD commit: 6537cfb395f3 Merge tag 'sound-6.14-rc4' of git://git.kerne..
> git tree: upstream
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13d89498580000

#syz test

--- x/include/net/net_namespace.h
+++ y/include/net/net_namespace.h
@@ -339,6 +339,7 @@ static inline void __netns_tracker_alloc
bool refcounted,
gfp_t gfp)
{
+ get_net(net);
#ifdef CONFIG_NET_NS_REFCNT_TRACKER
ref_tracker_alloc(refcounted ? &net->refcnt_tracker :
&net->notrefcnt_tracker,
@@ -360,6 +361,7 @@ static inline void __netns_tracker_free(
ref_tracker_free(refcounted ? &net->refcnt_tracker :
&net->notrefcnt_tracker, tracker);
#endif
+ put_net(net);
}

static inline struct net *get_net_track(struct net *net,
--