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: <bf3296be-10f7-5a43-5ae8-dfc5b6d41240@quicinc.com>
Date:   Fri, 10 Feb 2023 12:26:52 +0530
From:   Prashanth K <quic_prashk@...cinc.com>
To:     Alan Stern <stern@...land.harvard.edu>
CC:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        Xiu Jianfeng <xiujianfeng@...wei.com>,
        Pratham Pratap <quic_ppratap@...cinc.com>,
        Jack Pham <quic_jackp@...cinc.com>,
        <linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] usb: gadget: u_serial: Add null pointer check in
 gserial_resume



> And this seems like a viable option to me, what do you suggest?
> 
> gserial_disconnect {
>      spin_lock(static)
>      spin_lock(port)
>      ...
>      gser->ioport = NULL;
>      ...
>      spin_lock(port)
>      spin_unlock(static)
> 
> }
> 
> gserial_resume {
>      struct gs_port *port = gser->ioport;
> 
>      spin_lock(static)
>      if (!port)
	   spin_unlock(static)
>          return
>      spin_lock(port)
> 
>      ...
>      spin_unlock(port)
>      spin_unlock(static)
> }
> 
> Thanks,
> Prashanth K
Small correction inlined.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ