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  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]
Date:   Sun, 08 Jan 2017 18:04:52 +0200
From:   Andy Shevchenko <>
To:     Christoph Hellwig <>,
        Andy Shevchenko <>,
        Tejun Heo <>, Bjorn Helgaas <>
Cc:     Jan Kiszka <>,
        Christoph Hellwig <>,
        Greg Kroah-Hartman <>,
        "" <>,
        Linux Kernel Mailing List <>
Subject: Re: [PATCH] serial: 8250_lpss: Release Quark MSI vectors on exit

On Sun, 2017-01-08 at 02:24 -0800, Christoph Hellwig wrote:
> On Thu, Jan 05, 2017 at 12:19:56AM +0200, Andy Shevchenko wrote:
> > NAK, check the PCI devres code, please.

+Cc: Tejun, Bjorn.

> Releasing something through devres that wasn't allocated using a
> devm_* or
> pcim_* function isn't expected, and we should fix that instead.
> pci_free_irq_vectors is _currently_ implemented by calling
> pci_disable_msi and pci_disable_msix, but there is no guarantee for
> that
> in the API.

> Your code works by accident, not by design.  If you want the resources
> to be auto-released you need to add a proper pcim_alloc_irq_vectors
> API.

Though idea sounds sane I disagree this is accidental. The PCI managed
introduction includes among other this one:

+  pcim_enable_device() : after success, all PCI ops become managed

As per commit 9ac7849e35f7 ("devres: device resource management").

Thus, I suppose a new API should follow existing design, or provide a
sane fix. I briefly checked MSI/-X usage and since I'm not so familiar
with the PCI core code, I wouldn't be brave to break it.

Currently I suspect pci_free_irq_vectors() is not friendly with

Andy Shevchenko <>
Intel Finland Oy

Powered by blists - more mailing lists