From: Moni Shoua Date: Thu, 21 Aug 2014 11:28:37 +0000 (+0300) Subject: IB/mlx4: Avoid null pointer dereference in mlx4_ib_scan_netdevs() X-Git-Tag: fixes-for-v3.18-merge-window~78^2^4~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e381835cf1b8e3b2857277dbc3b77d8c5350f70a;p=pandora-kernel.git IB/mlx4: Avoid null pointer dereference in mlx4_ib_scan_netdevs() When Ethernet netdev is not present for a port (e.g. when the link layer type of the port is InfiniBand) it's possible to dereference a null pointer when we do netdevice scanning. To fix that, we move a section of code that needs to run only when netdev is present to a proper if () statement. Fixes: ad4885d279b6 ("IB/mlx4: Build the port IBoE GID table properly under bonding") Reported-by: Dan Carpenter Signed-off-by: Moni Shoua Signed-off-by: Or Gerlitz Signed-off-by: Roland Dreier --- Reading git-diff-tree failed