Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

IB/ipath: deref correct pointer when using kernel SMA

At this point, the core QP structure hasn't been initialized, so what's
in there isn't valid. Get the same information elsewhere.

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>

authored by

Bryan O'Sullivan and committed by
Roland Dreier
09b74de9 39770264

+1 -1
+1 -1
drivers/infiniband/hw/ipath/ipath_qp.c
··· 734 734 ipath_reset_qp(qp); 735 735 736 736 /* Tell the core driver that the kernel SMA is present. */ 737 - if (qp->ibqp.qp_type == IB_QPT_SMI) 737 + if (init_attr->qp_type == IB_QPT_SMI) 738 738 ipath_layer_set_verbs_flags(dev->dd, 739 739 IPATH_VERBS_KERNEL_SMA); 740 740 break;