* [PATCH net-next] rds: rds_rm_zerocopy_callback() correct order for list_add_tail()
@ 2023-02-09 12:26 Pietro Borrello
2023-02-13 9:40 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Pietro Borrello @ 2023-02-09 12:26 UTC (permalink / raw)
To: Santosh Shilimkar, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Willem de Bruijn, Sowmini Varadhan
Cc: Cristiano Giuffrida, Bos, H.J.,
Jakob Koschel, netdev, linux-rdma, rds-devel, linux-kernel,
Pietro Borrello
rds_rm_zerocopy_callback() uses list_add_tail() with swapped
arguments. This links the list head with the new entry, losing
the references to the remaining part of the list.
Fixes: 9426bbc6de99 ("rds: use list structure to track information for zerocopy completion notification")
Suggested-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Pietro Borrello <borrello@diag.uniroma1.it>
---
net/rds/message.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/rds/message.c b/net/rds/message.c
index b47e4f0a1639..ff10efa51632 100644
--- a/net/rds/message.c
+++ b/net/rds/message.c
@@ -118,7 +118,7 @@ static void rds_rm_zerocopy_callback(struct rds_sock *rs,
ck = &info->zcookies;
memset(ck, 0, sizeof(*ck));
WARN_ON(!rds_zcookie_add(info, cookie));
- list_add_tail(&q->zcookie_head, &info->rs_zcookie_next);
+ list_add_tail(&info->rs_zcookie_next, &q->zcookie_head);
spin_unlock_irqrestore(&q->lock, flags);
/* caller invokes rds_wake_sk_sleep() */
---
base-commit: 4ec5183ec48656cec489c49f989c508b68b518e3
change-id: 20230209-rds-list-add-tail-118d057b15bf
Best regards,
--
Pietro Borrello <borrello@diag.uniroma1.it>
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH net-next] rds: rds_rm_zerocopy_callback() correct order for list_add_tail()
2023-02-09 12:26 [PATCH net-next] rds: rds_rm_zerocopy_callback() correct order for list_add_tail() Pietro Borrello
@ 2023-02-13 9:40 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-02-13 9:40 UTC (permalink / raw)
To: Pietro Borrello
Cc: santosh.shilimkar, davem, edumazet, kuba, pabeni, willemb,
sowmini.varadhan, c.giuffrida, h.j.bos, jkl820.git, netdev,
linux-rdma, rds-devel, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:
On Thu, 09 Feb 2023 12:26:23 +0000 you wrote:
> rds_rm_zerocopy_callback() uses list_add_tail() with swapped
> arguments. This links the list head with the new entry, losing
> the references to the remaining part of the list.
>
> Fixes: 9426bbc6de99 ("rds: use list structure to track information for zerocopy completion notification")
> Suggested-by: Paolo Abeni <pabeni@redhat.com>
> Signed-off-by: Pietro Borrello <borrello@diag.uniroma1.it>
>
> [...]
Here is the summary with links:
- [net-next] rds: rds_rm_zerocopy_callback() correct order for list_add_tail()
https://git.kernel.org/netdev/net-next/c/68762148d1b0
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] 2+ messages in thread
end of thread, other threads:[~2023-02-13 9:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-09 12:26 [PATCH net-next] rds: rds_rm_zerocopy_callback() correct order for list_add_tail() Pietro Borrello
2023-02-13 9:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®