Re: [PATCH 2/5] PCI: cadence: Fix NULL pointer error for ops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 8/29/2025 5:43 AM, Bjorn Helgaas wrote:
On Thu, Aug 28, 2025 at 10:17:17AM +0800, Chen Wang wrote:
From: Chen Wang <unicorn_wang@xxxxxxxxxxx>

ops of struct cdns_pcie may be NULL, direct use
will result in a null pointer error.

Add checking of pcie->ops before using it.

Fixes: 40d957e6f9eb ("PCI: cadence: Add support to start link and verify link status")
Do you observe this NULL pointer dereference with an existing driver?

If this is only to make it possible to add a new driver that doesn't
supply a pcie->ops pointer, it doesn't need a Fixes: tag because
there's not a problem with existing drivers and this change would not
need to be backported.

If it *is* a problem with an existing driver, please point out which
one.

No, the existing driver does not have this problem. Only my newly added driver doesn't supply a pcie->ops pointer.

I will remove this Fixes tag in next revision.

Thanks,

Chen

[......]





[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux