In the Linux kernel, the following vulnerability has been resolved:
net/smc: Fix NULL pointer dereferencing in smc_vlan_by_tcpsk()
Coverity reports a possible NULL dereferencing problem:
in smc_vlan_by_tcpsk():
- returned_null: netdev_lower_get_next returns NULL (checked 29 out of 30 times).
- var_assigned: Assigning: ndev = NULL return value from netdev_lower_get_next.
- dereference: Dereferencing a pointer that might be NULL ndev when calling is_vlan_dev.
Remove the manual implementation and use netdev_walk_all_lower_dev() to iterate over the lower devices. While on it remove an obsolete function parameter comment.