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: <110653ad-fd8f-8047-62de-dd9ce2cb9d5f@linux.intel.com>
Date:   Sat, 28 Mar 2020 14:55:50 -0700
From:   "Kuppuswamy, Sathyanarayanan" 
        <sathyanarayanan.kuppuswamy@...ux.intel.com>
To:     Bjorn Helgaas <helgaas@...nel.org>
Cc:     linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
        ashok.raj@...el.com
Subject: Re: [PATCH v18 05/11] PCI/ERR: Remove service dependency in
 pcie_do_recovery()

Hi Bjorn,

On 3/28/20 2:32 PM, Bjorn Helgaas wrote:
> On Sat, Mar 28, 2020 at 02:12:48PM -0700, Kuppuswamy, Sathyanarayanan wrote:
>> On 3/23/20 5:26 PM, sathyanarayanan.kuppuswamy@...ux.intel.com wrote:
>>> From: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@...ux.intel.com>
>>>
>>
>>> +void pcie_do_recovery(struct pci_dev *dev,
>>> +		      enum pci_channel_state state,
>>> +		      pci_ers_result_t (*reset_link)(struct pci_dev *pdev))
>>>    {
>>>    	pci_ers_result_t status = PCI_ERS_RESULT_CAN_RECOVER;
>>>    	struct pci_bus *bus;
>>> @@ -206,9 +165,12 @@ void pcie_do_recovery(struct pci_dev *dev, enum pci_channel_state state,
>>>    	pci_dbg(dev, "broadcast error_detected message\n");
>>>    	if (state == pci_channel_io_frozen) {
>>>    		pci_walk_bus(bus, report_frozen_detected, &status);
>>> -		status = reset_link(dev, service);
>>> -		if 		if (reset_link)
>> 			status = reset_link(dev);(status == PCI_ERS_RESULT_DISCONNECT
>>> +		status = reset_link(dev);
>> Above line needs to be replaced as below. Since there is a
>> possibility reset_link can NULL (eventhough currently its
>> not true).
>> 		if (reset_link)
>> 			status = reset_link(dev);
>> Shall I submit another version to add above fix on top of
>> our pci/edr branch ?
> 
> No, I can squash that in if needed.
> 
> But I don't actually think we *do* need it.  All the callers supply a
> valid reset_link function pointer, and if somebody changes or adds a
> new one that doesn't, I'd rather take the null pointer exception and
> find out about it than silently ignore it.
But the documentation says "If reset_link is not NULL, recovery function
will use it to reset the link." It considers NULL as a possible case.
So I think its better to allow that case with a pci_warn() message.
> 
> Bjorn
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ