[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d24c7d6bdb97aa2f54667366aaaf044042734bff.camel@sipsolutions.net>
Date: Mon, 15 Dec 2025 09:39:51 +0100
From: Johannes Berg <johannes@...solutions.net>
To: David Laight <david.laight.linux@...il.com>, Ma Ke <make24@...as.ac.cn>
Cc: krzk@...nel.org, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, horms@...nel.org,
aloisio.almeida@...nbossa.org, lauro.venancio@...nbossa.org,
sameo@...ux.intel.com, linville@...driver.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
stable@...r.kernel.org
Subject: Re: [PATCH] NFC: Fix error handling in nfc_genl_dump_targets
On Sun, 2025-12-14 at 13:54 +0000, David Laight wrote:
> On Sun, 14 Dec 2025 21:17:26 +0800
> Ma Ke <make24@...as.ac.cn> wrote:
>
> > nfc_genl_dump_targets() increments the device reference count via
> > nfc_get_device() but fails to decrement it properly. nfc_get_device()
> > calls class_find_device() which internally calls get_device() to
> > increment the reference count. No corresponding put_device() is made
> > to decrement the reference count.
> >
> > Add proper reference count decrementing using nfc_put_device() when
> > the dump operation completes or encounters an error, ensuring balanced
> > reference counting.
> >
> > Found by code review.
>
> Is that some half-hearted AI code review?
Probably. They also resubmitted the same patch after being told 3 weeks
ago to go away.
johannes
Powered by blists - more mailing lists