rds: rds_rm_zerocopy_callback() correct order for list_add_tail()
authorPietro Borrello <borrello@diag.uniroma1.it>
Thu, 9 Feb 2023 12:26:23 +0000 (12:26 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:39:16 +0000 (09:39 +0100)
commit99e8e6fd70a190cab5f5af9cd492eb6a664bdf5d
tree9f61c27249059d7db8b30f25ca06b98782481194
parentd7bd166859fe3d68071ace63bfd47e85e2b20a28
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>
net/rds/message.c