summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/hfi1
diff options
context:
space:
mode:
authorDennis Dalessandro <dennis.dalessandro@intel.com>2017-11-14 15:34:23 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-02-25 13:07:56 +0300
commit844dfa1b41887029fce142f83cae07dfb9e6e86e (patch)
treeb1167b0f3e8bf247266a9f084b39285b6fe8aa05 /drivers/infiniband/hw/hfi1
parent04521caaea964d627d4c969da7887935150d7280 (diff)
downloadlinux-844dfa1b41887029fce142f83cae07dfb9e6e86e.tar.xz
IB/hfi1: Initialize bth1 in 16B rc ack builder
[ Upstream commit 8935780b9f7bbad0f2eb5dd43f61ba7b509a1575 ] It is possible the bth1 variable could be used uninitialized so going ahead and giving it a default value. Otherwise we leak stack memory to the network. Fixes: 5b6cabb0db77 ("IB/hfi1: Add 16B RC/UC support") Reviewed-by: Don Hiatt <don.hiatt@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/infiniband/hw/hfi1')
-rw-r--r--drivers/infiniband/hw/hfi1/rc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hfi1/rc.c b/drivers/infiniband/hw/hfi1/rc.c
index e1cf0c08ca6f..84c6a6ff4a67 100644
--- a/drivers/infiniband/hw/hfi1/rc.c
+++ b/drivers/infiniband/hw/hfi1/rc.c
@@ -815,7 +815,7 @@ static inline void hfi1_make_rc_ack_16B(struct rvt_qp *qp,
struct hfi1_pportdata *ppd = ppd_from_ibp(ibp);
struct hfi1_16b_header *hdr = &opa_hdr->opah;
struct ib_other_headers *ohdr;
- u32 bth0, bth1;
+ u32 bth0, bth1 = 0;
u16 len, pkey;
u8 becn = !!is_fecn;
u8 l4 = OPA_16B_L4_IB_LOCAL;