lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <624DAF08.9080304@gmail.com>
Date:   Wed, 06 Apr 2022 18:17:28 +0300
From:   Eli Billauer <eli.billauer@...il.com>
To:     Hangyu Hua <hbh25y@...il.com>
CC:     arnd@...db.de, gregkh@...uxfoundation.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] char: xillybus: fix a refcount leak in cleanup_dev()

I stand corrected. Thanks a lot.

    Eli

Acked-by: Eli Billauer <eli.billauer@...il.com>

On 06/04/22 10:57, Hangyu Hua wrote:
> usb_get_dev is called in xillyusb_probe. So it is better to call
> usb_put_dev before xdev is released.
>
> Signed-off-by: Hangyu Hua<hbh25y@...il.com>
> ---
>   drivers/char/xillybus/xillyusb.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/char/xillybus/xillyusb.c b/drivers/char/xillybus/xillyusb.c
> index dc3551796e5e..39bcbfd908b4 100644
> --- a/drivers/char/xillybus/xillyusb.c
> +++ b/drivers/char/xillybus/xillyusb.c
> @@ -549,6 +549,7 @@ static void cleanup_dev(struct kref *kref)
>   	if (xdev->workq)
>   		destroy_workqueue(xdev->workq);
>
> +	usb_put_dev(xdev->udev);
>   	kfree(xdev->channels); /* Argument may be NULL, and that's fine */
>   	kfree(xdev);
>   }
>    

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ