]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/siw: Always consume all skbuf data in sk_data_ready() upcall.
authorBernard Metzler <bmt@zurich.ibm.com>
Tue, 20 Sep 2022 08:12:02 +0000 (10:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 11:22:38 +0000 (13:22 +0200)
commit2412aae6b3df41329461a5e1cf4c1e12694a504a
tree5d872087fbe6b152fbc51310a7b6cab056fa489e
parent969e9592d00ce6dacec9029d5d2bc05f0eabfe53
RDMA/siw: Always consume all skbuf data in sk_data_ready() upcall.

[ Upstream commit 48d9fbed6e24132548a51177436672b9e684a2e3 ]

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: b0261670b052 ("rdma/siw: receive path")
Reported-by: Olga Kornievskaia <kolga@netapp.com>
Tested-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Bernard Metzler <bmt@zurich.ibm.com>
Link: https://lore.kernel.org/r/20220920081202.223629-1-bmt@zurich.ibm.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/sw/siw/siw_qp_rx.c