Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/smc: fix access to parent of an ib device
The parent of an ib device is used to retrieve the PCI device attributes. It turns out that there are possible cases when an ib device has no parent set in the device structure, which may lead to page faults when trying to access this memory. Fix that by checking the parent pointer and consolidate the pci device specific processing in a new function. Fixes: a3db10e ("net/smc: Add support for obtaining SMCR device list") Reported-by: [email protected] Signed-off-by: Karsten Graul <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
- Loading branch information