skmsg: Schedule psock work if the cached skb exists on the psock
authorLiu Jian <liujian56@huawei.com>
Wed, 7 Sep 2022 07:13:11 +0000 (15:13 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 10:34:46 +0000 (12:34 +0200)
commit9233ab8198d8faea0f1b7117a0d9e405536a2aad
treedf5868ef04abdf002ce87e529dd677f8c73b7271
parent44f1dc2e821dd49e62629b6406a53e14b16d7700
skmsg: Schedule psock work if the cached skb exists on the psock

[ Upstream commit bec217197b412d74168c6a42fc0f76d0cc9cad00 ]

In sk_psock_backlog function, for ingress direction skb, if no new data
packet arrives after the skb is cached, the cached skb does not have a
chance to be added to the receive queue of psock. As a result, the cached
skb cannot be received by the upper-layer application. Fix this by reschedule
the psock work to dispose the cached skb in sk_msg_recvmsg function.

Fixes: 604326b41a6f ("bpf, sockmap: convert to generic sk_msg interface")
Signed-off-by: Liu Jian <liujian56@huawei.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20220907071311.60534-1-liujian56@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/core/skmsg.c