]> git.baikalelectronics.ru Git - kernel.git/commit
rds: rds_rm_zerocopy_callback() use list_first_entry()
authorPietro Borrello <borrello@diag.uniroma1.it>
Tue, 7 Feb 2023 18:26:34 +0000 (18:26 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Feb 2023 18:11:48 +0000 (19:11 +0100)
commite4e0d8a5ba850f908e36fbca89c37075841d46c0
tree66c8c21fbd9a3341e10f705dbc6867efaa75bbc2
parent1784a5b626fc83d4a29defca811ce0095d258e40
rds: rds_rm_zerocopy_callback() use list_first_entry()

[ Upstream commit 5784ea8ca34eecb408c7e8bb915fed8493c42b58 ]

rds_rm_zerocopy_callback() uses list_entry() on the head of a list
causing a type confusion.
Use list_first_entry() to actually access the first element of the
rs_zcookie_queue list.

Fixes: 6a9be51d976d ("rds: use list structure to track information for zerocopy completion notification")
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Pietro Borrello <borrello@diag.uniroma1.it>
Link: https://lore.kernel.org/r/20230202-rds-zerocopy-v3-1-83b0df974f9a@diag.uniroma1.it
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/rds/message.c