Commit d00d3637 authored by Bernard Metzler's avatar Bernard Metzler Committed by Jialin Zhang
Browse files

RDMA/siw: Always consume all skbuf data in sk_data_ready() upcall.

stable inclusion
from stable-v5.10.150
commit e3917c85f41ef1df64e27dc0e46ab0d803c5e73e
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6D0XA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e3917c85f41ef1df64e27dc0e46ab0d803c5e73e



--------------------------------

[ Upstream commit 75420985 ]

For header and trailer/padding processing, siw did not consume new
skb data until minimum amount present to fill current header or trailer
structure, including potential payload padding. Not consuming any
data during upcall may cause a receive stall, since tcp_read_sock()
is not upcalling again if no new data arrive.
A NFSoRDMA client got stuck at RDMA Write reception of unaligned
payload, if the current skb did contain only the expected 3 padding
bytes, but not the 4 bytes CRC trailer. Expecting 4 more bytes already
arrived in another skb, and not consuming those 3 bytes in the current
upcall left the Write incomplete, waiting for the CRC forever.

Fixes: 8b6a361b ("rdma/siw: receive path")
Reported-by: default avatarOlga Kornievskaia <kolga@netapp.com>
Tested-by: default avatarOlga Kornievskaia <kolga@netapp.com>
Signed-off-by: default avatarBernard Metzler <bmt@zurich.ibm.com>
Link: https://lore.kernel.org/r/20220920081202.223629-1-bmt@zurich.ibm.com


Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parent 4c8613fb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment