Skip to contentSkip to conversation

FAILED: patch "[PATCH] IB/hfi1: Use bool in process_ecn" failed to apply to 4.11-stable tree

PATCH [email protected] 2 participants 3 messages May 17, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.11-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

Quoted 1 line

From 4608e4c8f2417a5a2985da9890710033c434c387 Mon Sep 17 00:00:00 2001

From: Dennis Dalessandro <[email protected]>
Date: Sun, 9 Apr 2017 10:17:30 -0700
Subject: [PATCH] IB/hfi1: Use bool in process_ecn

The process_ecn intends to return a bool value. However it is doing so incorrectly by ANDing the fecn mask. The fecn bit is bit 31. Bool is not a native data type and is up to the compiler to implement how it sees fit. It is conceivable that this upper bit gets washed out.

Fix by converting to a bool properly.

Fixes Commit fd2b562edca6 ("IB/hfi1: Pull FECN/BECN processing to a common place")
drivers/infiniband/hw/hfi1/hfi.h +1 -1
index 9d7c65c7f939..f06674317abf 100644
@@ -1660,7 +1660,7 @@ static inline bool process_ecn(struct rvt_qp *qp, struct hfi1_packet *pkt,
 	bth1 = be32_to_cpu(ohdr->bth[1]);
 	if (unlikely(bth1 & (IB_BECN_SMASK | IB_FECN_SMASK))) {
 		hfi1_process_ecn_slowpath(qp, pkt, do_cnp);
-		return bth1 & IB_FECN_SMASK;
+		return !!(bth1 & IB_FECN_SMASK);
 	}
 	return false;
 }
drivers/infiniband/hw/hfi1/rc.c +2 -1
index da968b76ba62..9b3333fd9dc0 100644
@@ -1930,7 +1930,8 @@ void hfi1_rc_rcv(struct hfi1_packet *packet)
 	int diff;
 	struct ib_reth *reth;
 	unsigned long flags;
-	int ret, is_fecn = 0;
+	int ret;
+	bool is_fecn = false;
 	bool copy_last = false;
 	u32 rkey;
 
#1 lore raw
Quoted 9 lines

Subject: FAILED: patch "[PATCH] IB/hfi1: Use bool in process_ecn" failed to apply to 4.11-stable tree

The patch below does not apply to the 4.11-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

Greg, this patch picked clean for me.

Never the less I have sent a unique patch for this tree to the stable list.

Mike

#2 lore raw
In reply to [email protected]
Quoted 7 lines
Quoted 1 line

Greg, this patch picked clean for me.

Never the less I have sent a unique patch for this tree to the stable list.

Mike

Greg,

This is Denny's patch to repair. There is no follow-on patch.

Sorry for any confusion.

The ACKs and fails together in my inbox messed me up.

Sorry,
Mike