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] [thread-next>] [day] [month] [year] [list]
Message-ID: <YP0FU1jMuhcy6wLu@kroah.com>
Date:   Sun, 25 Jul 2021 08:31:47 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Salah Triki <salah.triki@...il.com>
Cc:     Marcus Folkesson <marcus.folkesson@...il.com>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] input: joystick: pxrc: use usb_get_intf()

On Sat, Jul 24, 2021 at 10:36:17PM +0100, Salah Triki wrote:
> Use usb_get_intf() in order to increment reference count of the usb
> interface structure.
> 
> Signed-off-by: Salah Triki <salah.triki@...il.com>
> ---
>  drivers/input/joystick/pxrc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/joystick/pxrc.c b/drivers/input/joystick/pxrc.c
> index ea2bf5951d67..59304352548b 100644
> --- a/drivers/input/joystick/pxrc.c
> +++ b/drivers/input/joystick/pxrc.c
> @@ -143,7 +143,7 @@ static int pxrc_probe(struct usb_interface *intf,
>  		return -ENOMEM;
>  
>  	mutex_init(&pxrc->pm_mutex);
> -	pxrc->intf = intf;
> +	pxrc->intf = usb_get_intf(intf);
>  
>  	usb_set_intfdata(pxrc->intf, pxrc);
>  
> -- 

You can not add a reference and never drop it :(

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ