Skip to content
Commit 3a523807 authored by Karsten Graul's avatar Karsten Graul Committed by Greg Kroah-Hartman
Browse files

net/smc: Fix NULL pointer dereference in smc_pnet_find_ib()

[ Upstream commit d22f4f97 ]

dev_name() was called with dev.parent as argument but without to
NULL-check it before.
Solve this by checking the pointer before the call to dev_name().

Fixes: af5f60c7

 ("net/smc: allow PCI IDs as ib device names in the pnet table")
Reported-by: default avatar <syzbot+03e3e228510223dabd34@syzkaller.appspotmail.com>
Signed-off-by: default avatarKarsten Graul <kgraul@linux.ibm.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 66b3107a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment