diff options
author | Pietro Borrello <borrello@diag.uniroma1.it> | 2023-02-09 15:26:23 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-11 18:39:26 +0300 |
commit | eb209a35d3627b6345bea0f07020c99897a2ca87 (patch) | |
tree | 1ecfc161370c0aad4c2ebbf5c3fa864d038b4fe7 /net | |
parent | b7aa7fbc16936efa5171b8038848e18acdbab63d (diff) | |
download | linux-eb209a35d3627b6345bea0f07020c99897a2ca87.tar.xz |
rds: rds_rm_zerocopy_callback() correct order for list_add_tail()
[ Upstream commit 68762148d1b011d47bc2ceed7321739b5aea1e63 ]
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/rds/message.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rds/message.c b/net/rds/message.c index b363ef13c75e..8fa3d19c2e66 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() */ |