[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z9KfJBzR9ZWFBJDf@smile.fi.intel.com>
Date: Thu, 13 Mar 2025 11:02:28 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Ma Ke <make24@...as.ac.cn>, Wang Hai <wanghai26@...wei.com>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, horms@...nel.org, jdamato@...tly.com,
aleksander.lobakin@...el.com, quic_zijuhu@...cinc.com,
wanghai26@...wei.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] net-sysfs: fix error handling in
netdev_register_kobject()
+Cc: Wang Hai
On Thu, Mar 13, 2025 at 11:01:18AM +0200, Andy Shevchenko wrote:
> On Thu, Mar 13, 2025 at 03:55:28PM +0800, Ma Ke wrote:
> > Once device_add() failed, we should call put_device() to decrement
> > reference count for cleanup. Or it could cause memory leak.
> >
> > As comment of device_add() says, 'if device_add() succeeds, you should
> > call device_del() when you want to get rid of it. If device_add() has
> > not succeeded, use only put_device() to drop the reference count'.
>
> Okay, have you read the history of this?
> 6b70fc94afd1 ("net-sysfs: Fix memory leak in netdev_register_kobject")
> 8ed633b9baf9 ("Revert "net-sysfs: Fix memory leak in netdev_register_kobject"")
> https://syzkaller.appspot.com/x/log.txt?x=1737671b200000
>
> TL;DR: next time provide a better changelog and clean syzkaller report.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists