Re: [PATCH v2 01/17] PCI/DPC: Allocate the DPC save buffer during device setup

From: David Matlack

Date: Fri Dec 04 2026 - 17:55:37 EST


On Fri Dec 4, 2026 at 3:51 AM PST, Lukas Wunner wrote:
> On Fri, Dec 04, 2026 at 12:43:10PM +0100, Lukas Wunner wrote:
>> On Fri, Nov 06, 2026 at 12:42:02AM +0000, David Matlack wrote:
>> > Allocate the DPC capability's save buffer in pci_dpc_init() rather than
>> > in dpc_probe(), and report an allocation failure, which dpc_probe()
>> > ignored.
>>
>> Good catch, could you amend dpc_probe() to handle the allocation failure?
>
> Oh I realize now, the failure mode is that save/restore of the
> DPC Extended Capability isn't performed. I guess that's all we
> can do.
>
> In patch [02/17] of this series, you're writing that this happens
> silently, but I don't think that's true. The user does get a splat
> when kzalloc() fails in _pci_add_cap_save_buffer(). So they know
> that something went awry and that they'll have to live with reduced
> functionality.

Good point, this is actually not silent. I'll fix that up in the next
version.