All of lore.kernel.org
 help / color / mirror / Atom feed
* 答复: [PATCH net-next] tipc: Return the correct errno code
  2021-06-04  1:47 [PATCH net-next] tipc: Return the correct errno code Zheng Yongjun
@ 2021-06-04  1:34 ` zhengyongjun
  2021-08-02  8:02   ` Hoang Huu Le
  2021-06-04 21:20 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 8+ messages in thread
From: zhengyongjun @ 2021-06-04  1:34 UTC (permalink / raw)
  To: jmaloy, ying.xue, davem, kuba, netdev, tipc-discussion, linux-kernel

Sorry, this patch is wrong, please ignore it, thanks :)

-----邮件原件-----
发件人: zhengyongjun 
发送时间: 2021年6月4日 9:47
收件人: jmaloy@redhat.com; ying.xue@windriver.com; davem@davemloft.net; kuba@kernel.org; netdev@vger.kernel.org; tipc-discussion@lists.sourceforge.net; linux-kernel@vger.kernel.org
抄送: zhengyongjun <zhengyongjun3@huawei.com>
主题: [PATCH net-next] tipc: Return the correct errno code

When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
 net/tipc/link.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/tipc/link.c b/net/tipc/link.c index c44b4bfaaee6..5b6181277cc5 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -912,7 +912,7 @@ static int link_schedule_user(struct tipc_link *l, struct tipc_msg *hdr)
 	skb = tipc_msg_create(SOCK_WAKEUP, 0, INT_H_SIZE, 0,
 			      dnode, l->addr, dport, 0, 0);
 	if (!skb)
-		return -ENOBUFS;
+		return -ENOMEM;
 	msg_set_dest_droppable(buf_msg(skb), true);
 	TIPC_SKB_CB(skb)->chain_imp = msg_importance(hdr);
 	skb_queue_tail(&l->wakeupq, skb);
@@ -1030,7 +1030,7 @@ void tipc_link_reset(struct tipc_link *l)
  *
  * Consumes the buffer chain.
  * Messages at TIPC_SYSTEM_IMPORTANCE are always accepted
- * Return: 0 if success, or errno: -ELINKCONG, -EMSGSIZE or -ENOBUFS
+ * Return: 0 if success, or errno: -ELINKCONG, -EMSGSIZE or -ENOBUFS or 
+ -ENOMEM
  */
 int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list,
 		   struct sk_buff_head *xmitq)
@@ -1088,7 +1088,7 @@ int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list,
 			if (!_skb) {
 				kfree_skb(skb);
 				__skb_queue_purge(list);
-				return -ENOBUFS;
+				return -ENOMEM;
 			}
 			__skb_queue_tail(transmq, skb);
 			tipc_link_set_skb_retransmit_time(skb, l);
--
2.25.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH net-next] tipc: Return the correct errno code
@ 2021-06-04  1:47 Zheng Yongjun
  2021-06-04  1:34 ` 答复: " zhengyongjun
  2021-06-04 21:20 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 8+ messages in thread
From: Zheng Yongjun @ 2021-06-04  1:47 UTC (permalink / raw)
  To: jmaloy, ying.xue, davem, kuba, netdev, tipc-discussion, linux-kernel
  Cc: Zheng Yongjun

When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
 net/tipc/link.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/tipc/link.c b/net/tipc/link.c
index c44b4bfaaee6..5b6181277cc5 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -912,7 +912,7 @@ static int link_schedule_user(struct tipc_link *l, struct tipc_msg *hdr)
 	skb = tipc_msg_create(SOCK_WAKEUP, 0, INT_H_SIZE, 0,
 			      dnode, l->addr, dport, 0, 0);
 	if (!skb)
-		return -ENOBUFS;
+		return -ENOMEM;
 	msg_set_dest_droppable(buf_msg(skb), true);
 	TIPC_SKB_CB(skb)->chain_imp = msg_importance(hdr);
 	skb_queue_tail(&l->wakeupq, skb);
@@ -1030,7 +1030,7 @@ void tipc_link_reset(struct tipc_link *l)
  *
  * Consumes the buffer chain.
  * Messages at TIPC_SYSTEM_IMPORTANCE are always accepted
- * Return: 0 if success, or errno: -ELINKCONG, -EMSGSIZE or -ENOBUFS
+ * Return: 0 if success, or errno: -ELINKCONG, -EMSGSIZE or -ENOBUFS or -ENOMEM
  */
 int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list,
 		   struct sk_buff_head *xmitq)
@@ -1088,7 +1088,7 @@ int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list,
 			if (!_skb) {
 				kfree_skb(skb);
 				__skb_queue_purge(list);
-				return -ENOBUFS;
+				return -ENOMEM;
 			}
 			__skb_queue_tail(transmq, skb);
 			tipc_link_set_skb_retransmit_time(skb, l);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH net-next] tipc: Return the correct errno code
  2021-06-04  1:47 [PATCH net-next] tipc: Return the correct errno code Zheng Yongjun
  2021-06-04  1:34 ` 答复: " zhengyongjun
@ 2021-06-04 21:20 ` patchwork-bot+netdevbpf
  2021-06-08  2:15   ` YueHaibing
  1 sibling, 1 reply; 8+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-06-04 21:20 UTC (permalink / raw)
  To: zhengyongjun
  Cc: jmaloy, ying.xue, davem, kuba, netdev, tipc-discussion, linux-kernel

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Fri, 4 Jun 2021 09:47:02 +0800 you wrote:
> When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF.
> 
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
> ---
>  net/tipc/link.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Here is the summary with links:
  - [net-next] tipc: Return the correct errno code
    https://git.kernel.org/netdev/net-next/c/0efea3c649f0

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH net-next] tipc: Return the correct errno code
  2021-06-04 21:20 ` patchwork-bot+netdevbpf
@ 2021-06-08  2:15   ` YueHaibing
  2021-06-08  2:35     ` 答复: " zhengyongjun
  2021-06-08  2:39     ` zhengyongjun
  0 siblings, 2 replies; 8+ messages in thread
From: YueHaibing @ 2021-06-08  2:15 UTC (permalink / raw)
  To: patchwork-bot+netdevbpf, zhengyongjun
  Cc: jmaloy, ying.xue, davem, kuba, netdev, tipc-discussion, linux-kernel


On 2021/6/5 5:20, patchwork-bot+netdevbpf@kernel.org wrote:
> Hello:
> 
> This patch was applied to netdev/net-next.git (refs/heads/master):

This should not be applied.

tipc_node_xmit() now check -ENOBUFS rather than -ENOMEM.

Yongjun, maybe you fix this now?

> 
> On Fri, 4 Jun 2021 09:47:02 +0800 you wrote:
>> When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF.
>>
>> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
>> ---
>>  net/tipc/link.c | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> Here is the summary with links:
>   - [net-next] tipc: Return the correct errno code
>     https://git.kernel.org/netdev/net-next/c/0efea3c649f0
> 
> You are awesome, thank you!
> --
> Deet-doot-dot, I am a bot.
> https://korg.docs.kernel.org/patchwork/pwbot.html
> 
> 
> .
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* 答复: [PATCH net-next] tipc: Return the correct errno code
  2021-06-08  2:15   ` YueHaibing
@ 2021-06-08  2:35     ` zhengyongjun
  2021-06-08  2:39     ` zhengyongjun
  1 sibling, 0 replies; 8+ messages in thread
From: zhengyongjun @ 2021-06-08  2:35 UTC (permalink / raw)
  To: yuehaibing, patchwork-bot+netdevbpf
  Cc: jmaloy, ying.xue, davem, kuba, netdev, tipc-discussion, linux-kernel

Thanks for your advice, I will fix it right now :)

-----邮件原件-----
发件人: yuehaibing 
发送时间: 2021年6月8日 10:16
收件人: patchwork-bot+netdevbpf@kernel.org; zhengyongjun <zhengyongjun3@huawei.com>
抄送: jmaloy@redhat.com; ying.xue@windriver.com; davem@davemloft.net; kuba@kernel.org; netdev@vger.kernel.org; tipc-discussion@lists.sourceforge.net; linux-kernel@vger.kernel.org
主题: Re: [PATCH net-next] tipc: Return the correct errno code


On 2021/6/5 5:20, patchwork-bot+netdevbpf@kernel.org wrote:
> Hello:
> 
> This patch was applied to netdev/net-next.git (refs/heads/master):

This should not be applied.

tipc_node_xmit() now check -ENOBUFS rather than -ENOMEM.

Yongjun, maybe you fix this now?

> 
> On Fri, 4 Jun 2021 09:47:02 +0800 you wrote:
>> When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF.
>>
>> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
>> ---
>>  net/tipc/link.c | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> Here is the summary with links:
>   - [net-next] tipc: Return the correct errno code
>     https://git.kernel.org/netdev/net-next/c/0efea3c649f0
> 
> You are awesome, thank you!
> --
> Deet-doot-dot, I am a bot.
> https://korg.docs.kernel.org/patchwork/pwbot.html
> 
> 
> .
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* 答复: [PATCH net-next] tipc: Return the correct errno code
  2021-06-08  2:15   ` YueHaibing
  2021-06-08  2:35     ` 答复: " zhengyongjun
@ 2021-06-08  2:39     ` zhengyongjun
  1 sibling, 0 replies; 8+ messages in thread
From: zhengyongjun @ 2021-06-08  2:39 UTC (permalink / raw)
  To: yuehaibing, patchwork-bot+netdevbpf
  Cc: jmaloy, ying.xue, davem, kuba, netdev, tipc-discussion, linux-kernel

Sorry again, I introduce a bug to kernel, I will do it carefully later.

-----邮件原件-----
发件人: yuehaibing 
发送时间: 2021年6月8日 10:16
收件人: patchwork-bot+netdevbpf@kernel.org; zhengyongjun <zhengyongjun3@huawei.com>
抄送: jmaloy@redhat.com; ying.xue@windriver.com; davem@davemloft.net; kuba@kernel.org; netdev@vger.kernel.org; tipc-discussion@lists.sourceforge.net; linux-kernel@vger.kernel.org
主题: Re: [PATCH net-next] tipc: Return the correct errno code


On 2021/6/5 5:20, patchwork-bot+netdevbpf@kernel.org wrote:
> Hello:
> 
> This patch was applied to netdev/net-next.git (refs/heads/master):

This should not be applied.

tipc_node_xmit() now check -ENOBUFS rather than -ENOMEM.

Yongjun, maybe you fix this now?

> 
> On Fri, 4 Jun 2021 09:47:02 +0800 you wrote:
>> When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF.
>>
>> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
>> ---
>>  net/tipc/link.c | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> Here is the summary with links:
>   - [net-next] tipc: Return the correct errno code
>     https://git.kernel.org/netdev/net-next/c/0efea3c649f0
> 
> You are awesome, thank you!
> --
> Deet-doot-dot, I am a bot.
> https://korg.docs.kernel.org/patchwork/pwbot.html
> 
> 
> .
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH net-next] tipc: Return the correct errno code
  2021-06-04  1:34 ` 答复: " zhengyongjun
@ 2021-08-02  8:02   ` Hoang Huu Le
  2021-08-02  8:52     ` 答复: " zhengyongjun
  0 siblings, 1 reply; 8+ messages in thread
From: Hoang Huu Le @ 2021-08-02  8:02 UTC (permalink / raw)
  To: zhengyongjun, jmaloy, ying.xue, davem, kuba, netdev,
	tipc-discussion, linux-kernel

Hi Zheng,

The patch was being merged by accident. Will have you planning to revert it?
We need to do ASAP since calling path tipc_node_xmit() -> tipc_link_xmit() broken as side effect.

Thanks,
hoang
> -----Original Message-----
> From: zhengyongjun <zhengyongjun3@huawei.com>
> Sent: Friday, June 4, 2021 8:35 AM
> To: jmaloy@redhat.com; ying.xue@windriver.com; davem@davemloft.net; kuba@kernel.org; netdev@vger.kernel.org; tipc-
> discussion@lists.sourceforge.net; linux-kernel@vger.kernel.org
> Subject: 答复: [PATCH net-next] tipc: Return the correct errno code
> 
> Sorry, this patch is wrong, please ignore it, thanks :)
> 
> -----邮件原件-----
> 发件人: zhengyongjun
> 发送时间: 2021年6月4日 9:47
> 收件人: jmaloy@redhat.com; ying.xue@windriver.com; davem@davemloft.net; kuba@kernel.org; netdev@vger.kernel.org; tipc-
> discussion@lists.sourceforge.net; linux-kernel@vger.kernel.org
> 抄送: zhengyongjun <zhengyongjun3@huawei.com>
> 主题: [PATCH net-next] tipc: Return the correct errno code
> 
> When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF.
> 
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
> ---
>  net/tipc/link.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/net/tipc/link.c b/net/tipc/link.c index c44b4bfaaee6..5b6181277cc5 100644
> --- a/net/tipc/link.c
> +++ b/net/tipc/link.c
> @@ -912,7 +912,7 @@ static int link_schedule_user(struct tipc_link *l, struct tipc_msg *hdr)
>  	skb = tipc_msg_create(SOCK_WAKEUP, 0, INT_H_SIZE, 0,
>  			      dnode, l->addr, dport, 0, 0);
>  	if (!skb)
> -		return -ENOBUFS;
> +		return -ENOMEM;
>  	msg_set_dest_droppable(buf_msg(skb), true);
>  	TIPC_SKB_CB(skb)->chain_imp = msg_importance(hdr);
>  	skb_queue_tail(&l->wakeupq, skb);
> @@ -1030,7 +1030,7 @@ void tipc_link_reset(struct tipc_link *l)
>   *
>   * Consumes the buffer chain.
>   * Messages at TIPC_SYSTEM_IMPORTANCE are always accepted
> - * Return: 0 if success, or errno: -ELINKCONG, -EMSGSIZE or -ENOBUFS
> + * Return: 0 if success, or errno: -ELINKCONG, -EMSGSIZE or -ENOBUFS or
> + -ENOMEM
>   */
>  int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list,
>  		   struct sk_buff_head *xmitq)
> @@ -1088,7 +1088,7 @@ int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list,
>  			if (!_skb) {
>  				kfree_skb(skb);
>  				__skb_queue_purge(list);
> -				return -ENOBUFS;
> +				return -ENOMEM;
>  			}
>  			__skb_queue_tail(transmq, skb);
>  			tipc_link_set_skb_retransmit_time(skb, l);
> --
> 2.25.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* 答复: [PATCH net-next] tipc: Return the correct errno code
  2021-08-02  8:02   ` Hoang Huu Le
@ 2021-08-02  8:52     ` zhengyongjun
  0 siblings, 0 replies; 8+ messages in thread
From: zhengyongjun @ 2021-08-02  8:52 UTC (permalink / raw)
  To: Hoang Huu Le, jmaloy, ying.xue, davem, kuba, netdev,
	tipc-discussion, linux-kernel

Hi hoang,

I don't notice that patch has been merged, If you need me to send a revert patch, I will send it as soon as possible.
If you submit the revert patch by your team, it's also ok. 

Thanks,
Zheng

-----邮件原件-----
发件人: Hoang Huu Le [mailto:hoang.h.le@dektech.com.au] 
发送时间: 2021年8月2日 16:02
收件人: zhengyongjun <zhengyongjun3@huawei.com>; jmaloy@redhat.com; ying.xue@windriver.com; davem@davemloft.net; kuba@kernel.org; netdev@vger.kernel.org; tipc-discussion@lists.sourceforge.net; linux-kernel@vger.kernel.org
主题: RE: [PATCH net-next] tipc: Return the correct errno code

Hi Zheng,

The patch was being merged by accident. Will have you planning to revert it?
We need to do ASAP since calling path tipc_node_xmit() -> tipc_link_xmit() broken as side effect.

Thanks,
hoang
> -----Original Message-----
> From: zhengyongjun <zhengyongjun3@huawei.com>
> Sent: Friday, June 4, 2021 8:35 AM
> To: jmaloy@redhat.com; ying.xue@windriver.com; davem@davemloft.net; 
> kuba@kernel.org; netdev@vger.kernel.org; tipc- 
> discussion@lists.sourceforge.net; linux-kernel@vger.kernel.org
> Subject: 答复: [PATCH net-next] tipc: Return the correct errno code
> 
> Sorry, this patch is wrong, please ignore it, thanks :)
> 
> -----邮件原件-----
> 发件人: zhengyongjun
> 发送时间: 2021年6月4日 9:47
> 收件人: jmaloy@redhat.com; ying.xue@windriver.com; davem@davemloft.net; 
> kuba@kernel.org; netdev@vger.kernel.org; tipc- 
> discussion@lists.sourceforge.net; linux-kernel@vger.kernel.org
> 抄送: zhengyongjun <zhengyongjun3@huawei.com>
> 主题: [PATCH net-next] tipc: Return the correct errno code
> 
> When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF.
> 
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
> ---
>  net/tipc/link.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/net/tipc/link.c b/net/tipc/link.c index 
> c44b4bfaaee6..5b6181277cc5 100644
> --- a/net/tipc/link.c
> +++ b/net/tipc/link.c
> @@ -912,7 +912,7 @@ static int link_schedule_user(struct tipc_link *l, struct tipc_msg *hdr)
>  	skb = tipc_msg_create(SOCK_WAKEUP, 0, INT_H_SIZE, 0,
>  			      dnode, l->addr, dport, 0, 0);
>  	if (!skb)
> -		return -ENOBUFS;
> +		return -ENOMEM;
>  	msg_set_dest_droppable(buf_msg(skb), true);
>  	TIPC_SKB_CB(skb)->chain_imp = msg_importance(hdr);
>  	skb_queue_tail(&l->wakeupq, skb);
> @@ -1030,7 +1030,7 @@ void tipc_link_reset(struct tipc_link *l)
>   *
>   * Consumes the buffer chain.
>   * Messages at TIPC_SYSTEM_IMPORTANCE are always accepted
> - * Return: 0 if success, or errno: -ELINKCONG, -EMSGSIZE or -ENOBUFS
> + * Return: 0 if success, or errno: -ELINKCONG, -EMSGSIZE or -ENOBUFS 
> + or -ENOMEM
>   */
>  int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list,
>  		   struct sk_buff_head *xmitq)
> @@ -1088,7 +1088,7 @@ int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list,
>  			if (!_skb) {
>  				kfree_skb(skb);
>  				__skb_queue_purge(list);
> -				return -ENOBUFS;
> +				return -ENOMEM;
>  			}
>  			__skb_queue_tail(transmq, skb);
>  			tipc_link_set_skb_retransmit_time(skb, l);
> --
> 2.25.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-08-02  8:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04  1:47 [PATCH net-next] tipc: Return the correct errno code Zheng Yongjun
2021-06-04  1:34 ` 答复: " zhengyongjun
2021-08-02  8:02   ` Hoang Huu Le
2021-08-02  8:52     ` 答复: " zhengyongjun
2021-06-04 21:20 ` patchwork-bot+netdevbpf
2021-06-08  2:15   ` YueHaibing
2021-06-08  2:35     ` 答复: " zhengyongjun
2021-06-08  2:39     ` zhengyongjun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.