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: <0e4cfe24-adf6-8966-9f58-69f7aba7a6fa@ti.com>
Date:   Fri, 24 May 2019 14:11:33 +0530
From:   Kishon Vijay Abraham I <kishon@...com>
To:     Alan Mikhak <alan.mikhak@...ive.com>, <linux-pci@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <lorenzo.pieralisi@....com>,
        <linux-riscv@...ts.infradead.org>,
        Palmer Dabbelt <palmer@...ive.com>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Bjorn Helgaas <bhelgaas@...gle.com>
Subject: Re: [PATCH v2] PCI: endpoint: Set endpoint controller pointer to null



On 24/05/19 5:27 AM, Alan Mikhak wrote:
> +Bjorn Helgaas
> 
> On Thu, May 23, 2019 at 2:46 PM Alan Mikhak <alan.mikhak@...ive.com> wrote:
>>
>> Set endpoint controller pointer to null in pci_epc_remove_epf()
>> to avoid -EBUSY on subsequent call to pci_epc_add_epf().
>>
>> Requires checking for null endpoint function pointer.
>>
>> Signed-off-by: Alan Mikhak <alan.mikhak@...ive.com>

Acked-by: Kishon Vijay Abraham I <kishon@...com>
>> ---
>>  drivers/pci/endpoint/pci-epc-core.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/pci/endpoint/pci-epc-core.c b/drivers/pci/endpoint/pci-epc-core.c
>> index e4712a0f249c..2091508c1620 100644
>> --- a/drivers/pci/endpoint/pci-epc-core.c
>> +++ b/drivers/pci/endpoint/pci-epc-core.c
>> @@ -519,11 +519,12 @@ void pci_epc_remove_epf(struct pci_epc *epc, struct pci_epf *epf)
>>  {
>>         unsigned long flags;
>>
>> -       if (!epc || IS_ERR(epc))
>> +       if (!epc || IS_ERR(epc) || !epf)
>>                 return;
>>
>>         spin_lock_irqsave(&epc->lock, flags);
>>         list_del(&epf->list);
>> +       epf->epc = NULL;
>>         spin_unlock_irqrestore(&epc->lock, flags);
>>  }
>>  EXPORT_SYMBOL_GPL(pci_epc_remove_epf);
>> --
>> 2.7.4
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ