[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aNIzhU6m8zgxk-Li@stanley.mountain>
Date: Tue, 23 Sep 2025 08:43:33 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Ma Ke <make24@...as.ac.cn>
Cc: dpenkler@...il.com, gregkh@...uxfoundation.org,
matchstick@...erthere.org, dominik.karol.piatkowski@...tonmail.com,
arnd@...db.de, paul.retourne@...nge.fr,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
akpm@...ux-foundation.org, stable@...r.kernel.org
Subject: Re: [PATCH v3] staging: gpib: Fix device reference leak in fmh_gpib
driver
On Tue, Sep 23, 2025 at 09:36:03AM +0800, Ma Ke wrote:
> The fmh_gpib driver contains a device reference count leak in
> fmh_gpib_attach_impl() where driver_find_device() increases the
> reference count of the device by get_device() when matching but this
> reference is not properly decreased. Add put_device() in
> fmh_gpib_detach(), which ensures that the reference count of the
> device is correctly managed.
>
> Found by code review.
>
> Cc: stable@...r.kernel.org
> Fixes: 8e4841a0888c ("staging: gpib: Add Frank Mori Hess FPGA PCI GPIB driver")
> Signed-off-by: Ma Ke <make24@...as.ac.cn>
> ---
Thanks!
Reviewed-by: Dan Carpenter <dan.carpenter@...aro.org>
regards,
dan carpenter
Powered by blists - more mailing lists