Skip to contentSkip to conversation

devlink: fix return value check in devlink_dpipe_header_put()

PATCH Superseded Wei Yongjun 4 participants 7 messages Apr 10, 2017 – Apr 12, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 devlink: fix return value check in devlink_dpipe_header_put()

From: Wei Yongjun <[email protected]>

Fix the retrn value check which testing the wrong variable in devlink_dpipe_header_put().

Fixes 1555d204e743 ("devlink: Support for pipeline debug (dpipe)")
---
 net/core/devlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/core/devlink.c +1 -1
index 24b7660..0afac58 100644
@@ -2031,7 +2031,7 @@ static int devlink_dpipe_header_put(struct sk_buff *skb,
 	int err;
 
 	header_attr = nla_nest_start(skb, DEVLINK_ATTR_DPIPE_HEADER);
-	if (!header)
+	if (!header_attr)
 		return -EMSGSIZE;
 
 	if (nla_put_string(skb, DEVLINK_ATTR_DPIPE_HEADER_NAME, header->name) ||
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Mon, Apr 10, 2017 at 03:11:06PM CEST, [email protected] wrote:

From: Wei Yongjun <[email protected]>

Fix the retrn value check which testing the wrong variable

         ^^^^^ typo

Otherwise,

Quoted 22 lines

in devlink_dpipe_header_put().

Fixes 1555d204e743 ("devlink: Support for pipeline debug (dpipe)")

---
net/core/devlink.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
net/core/devlink.c +1 -1
index 24b7660..0afac58 100644
@@ -2031,7 +2031,7 @@ static int devlink_dpipe_header_put(struct sk_buff *skb,
 	int err;
 
 	header_attr = nla_nest_start(skb, DEVLINK_ATTR_DPIPE_HEADER);
-	if (!header)
+	if (!header_attr)
 		return -EMSGSIZE;
 
 	if (nla_put_string(skb, DEVLINK_ATTR_DPIPE_HEADER_NAME, header->name) ||
#2 lore raw

PATCH v2 1/1 devlink: fix return value check in devlink_dpipe_header_put()

In reply to Wei Yongjun

From: Wei Yongjun <[email protected]>

Fix the return value check which testing the wrong variable in devlink_dpipe_header_put().

Fixes 1555d204e743 ("devlink: Support for pipeline debug (dpipe)")

---
v1 -> v2: fix a typo in patch comment

---
 net/core/devlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/core/devlink.c +1 -1
index 24b7660..0afac58 100644
@@ -2031,7 +2031,7 @@ static int devlink_dpipe_header_put(struct sk_buff *skb,
 	int err;
 
 	header_attr = nla_nest_start(skb, DEVLINK_ATTR_DPIPE_HEADER);
-	if (!header)
+	if (!header_attr)
 		return -EMSGSIZE;
 
 	if (nla_put_string(skb, DEVLINK_ATTR_DPIPE_HEADER_NAME, header->name) ||
maintainer
#4 lore raw
In reply to Wei Yongjun

From: Wei Yongjun <[email protected]>
Date: Mon, 10 Apr 2017 13:11:06 +0000

Quoted 7 lines

From: Wei Yongjun <[email protected]>

Fix the retrn value check which testing the wrong variable in devlink_dpipe_header_put().

Fixes 1555d204e743 ("devlink: Support for pipeline debug (dpipe)")

This doesn't apply cleanly to net-next, please respin and also fix the typo in your commit message as pointed out by Jiri.

#5 lore raw

Hi David,

Quoted 14 lines

-----Original Message-----
From: David Miller [mailto:[email protected]]
Sent: Wednesday, April 12, 2017 11:03 AM
To: [email protected]
Cc: [email protected]; [email protected]; weiyongjun (A) <[email protected]>; [email protected]
Subject: Re: [PATCH net-next] devlink: fix return value check in devlink_dpipe_header_put()

From: Wei Yongjun <[email protected]>
Date: Mon, 10 Apr 2017 13:11:06 +0000

Quoted 2 lines

From: Wei Yongjun <[email protected]>

Quoted 8 lines
Quoted 5 lines

Fix the retrn value check which testing the wrong variable in devlink_dpipe_header_put().

Fixes 1555d204e743 ("devlink: Support for pipeline debug (dpipe)")

This doesn't apply cleanly to net-next, please respin and also fix the typo in your commit message as pointed out by Jiri.

You have applied the v2 version of this patch some hours ago.

Regards,
Yongjun Wei

maintainer
#6 lore raw

From: "weiyongjun (A)" <[email protected]>
Date: Wed, 12 Apr 2017 03:30:25 +0000

Quoted 19 lines

Hi David,

Quoted 17 lines

-----Original Message-----
From: David Miller [mailto:[email protected]]
Sent: Wednesday, April 12, 2017 11:03 AM
To: [email protected]
Cc: [email protected]; [email protected]; weiyongjun (A) <[email protected]>; [email protected]
Subject: Re: [PATCH net-next] devlink: fix return value check in devlink_dpipe_header_put()

From: Wei Yongjun <[email protected]>
Date: Mon, 10 Apr 2017 13:11:06 +0000

Quoted 5 lines

From: Wei Yongjun <[email protected]>

Fix the retrn value check which testing the wrong variable in devlink_dpipe_header_put().

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Fixes 1555d204e743 ("devlink: Support for pipeline debug (dpipe)")

This doesn't apply cleanly to net-next, please respin and also fix the typo in your commit message as pointed out by Jiri.

You have applied the v2 version of this patch some hours ago.

Aha, my bad. Thanks!