summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/korina.c
diff options
context:
space:
mode:
authorKarsten Graul <kgraul@linux.ibm.com>2020-12-15 12:10:58 +0300
committerJakub Kicinski <kuba@kernel.org>2020-12-17 00:33:47 +0300
commit995433b795cec0a4ef6c8603e7642903c621943a (patch)
treec36a689ee34bb11dba06e8769634f91da527ebfb /drivers/net/ethernet/korina.c
parentef72cd3c5ce168829c6684ecb2cae047d3493690 (diff)
downloadlinux-995433b795cec0a4ef6c8603e7642903c621943a.tar.xz
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: a3db10efcc4c ("net/smc: Add support for obtaining SMCR device list") Reported-by: syzbot+600fef7c414ee7e2d71b@syzkaller.appspotmail.com Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Link: https://lore.kernel.org/r/20201215091058.49354-2-kgraul@linux.ibm.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/korina.c')
0 files changed, 0 insertions, 0 deletions