diff options
author | Dennis Dalessandro <dennis.dalessandro@intel.com> | 2017-11-14 07:34:23 -0500 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2017-11-30 18:01:28 -0500 |
commit | 8935780b9f7bbad0f2eb5dd43f61ba7b509a1575 (patch) | |
tree | d9a657c3cb57275d13bdb7f692d4bedd3101a313 | |
parent | 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323 (diff) |
IB/hfi1: Initialize bth1 in 16B rc ack builder
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>
-rw-r--r-- | drivers/infiniband/hw/hfi1/rc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hfi1/rc.c b/drivers/infiniband/hw/hfi1/rc.c index fd01a760259f..af5f7936f7e5 100644 --- a/drivers/infiniband/hw/hfi1/rc.c +++ b/drivers/infiniband/hw/hfi1/rc.c | |||
@@ -814,7 +814,7 @@ static inline void hfi1_make_rc_ack_16B(struct rvt_qp *qp, | |||
814 | struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); | 814 | struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); |
815 | struct hfi1_16b_header *hdr = &opa_hdr->opah; | 815 | struct hfi1_16b_header *hdr = &opa_hdr->opah; |
816 | struct ib_other_headers *ohdr; | 816 | struct ib_other_headers *ohdr; |
817 | u32 bth0, bth1; | 817 | u32 bth0, bth1 = 0; |
818 | u16 len, pkey; | 818 | u16 len, pkey; |
819 | u8 becn = !!is_fecn; | 819 | u8 becn = !!is_fecn; |
820 | u8 l4 = OPA_16B_L4_IB_LOCAL; | 820 | u8 l4 = OPA_16B_L4_IB_LOCAL; |