Commit 8935780b authored by Dennis Dalessandro's avatar Dennis Dalessandro Committed by Jason Gunthorpe

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: 5b6cabb0 ("IB/hfi1: Add 16B RC/UC support")
Reviewed-by: default avatarDon Hiatt <don.hiatt@intel.com>
Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 4fbd8d19
...@@ -814,7 +814,7 @@ static inline void hfi1_make_rc_ack_16B(struct rvt_qp *qp, ...@@ -814,7 +814,7 @@ static inline void hfi1_make_rc_ack_16B(struct rvt_qp *qp,
struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); struct hfi1_pportdata *ppd = ppd_from_ibp(ibp);
struct hfi1_16b_header *hdr = &opa_hdr->opah; struct hfi1_16b_header *hdr = &opa_hdr->opah;
struct ib_other_headers *ohdr; struct ib_other_headers *ohdr;
u32 bth0, bth1; u32 bth0, bth1 = 0;
u16 len, pkey; u16 len, pkey;
u8 becn = !!is_fecn; u8 becn = !!is_fecn;
u8 l4 = OPA_16B_L4_IB_LOCAL; u8 l4 = OPA_16B_L4_IB_LOCAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment