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: <Yy2Xo30/WB9rja13@kroah.com>
Date:   Fri, 23 Sep 2022 13:25:23 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Ruan Jinjie <ruanjinjie@...wei.com>
Cc:     jirislaby@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] tty: moxa: add missing pci_disable_device()

On Fri, Sep 23, 2022 at 06:12:03PM +0800, Ruan Jinjie wrote:
> 
> 
> On 2022/9/23 17:56, Greg KH wrote:
> > On Fri, Sep 23, 2022 at 05:25:30PM +0800, ruanjinjie wrote:
> >> Driver should call pci_disable_device() if it returns from
> >> moxa_pci_probe() with error.
> > 
> > Why?
> > 
> > That is not a normal thing to do, as you can disable other PCI devices
> > attached to it, right?
> > 
> >> Meanwhile, the driver calls pci_enable_device() in
> >> moxa_pci_probe(), but never calls pci_disable_device() during removal.
> > 
> > And is that really a problem?
> > 
> >>
> >> Signed-off-by: ruanjinjie <ruanjinjie@...wei.com>
> >> ---
> >>  drivers/tty/moxa.c | 4 +++-
> >>  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > Do you have this hardware to test with?
> > 
> > How did you find this issue?
> > 
> 
> We use static analysis via coccinelle to find the above issue. The
> command we use is below:
> 
> spatch -I include -timeout 60 -very_quiet -sp_file
> pci_disable_device_missing.cocci drivers/tty/moxa.c

Please test with real hardware and look up what pci_disable_device()
does.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ