Commit c08f67f1 authored by Cong Wang's avatar Cong Wang Committed by Zheng Zengkai
Browse files

skmsg: Teach sk_psock_verdict_apply() to return errors

mainline inclusion
from mainline-v5.14-rc1
commit 1581a6c1
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4VIOZ?from=project-issue

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1581a6c1c3291a8320b080f4411345f60229976d



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

Currently sk_psock_verdict_apply() is void, but it handles some
error conditions too. Its caller is impossible to learn whether
it succeeds or fails, especially sk_psock_verdict_recv().

Make it return int to indicate error cases and propagate errors
to callers properly.

Fixes: ef565928 ("bpf, sockmap: Allow skipping sk_skb parser program")
Signed-off-by: default avatarCong Wang <cong.wang@bytedance.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Acked-by: default avatarJohn Fastabend <john.fastabend@gmail.com>
Acked-by: default avatarJakub Sitnicki <jakub@cloudflare.com>
Link: https://lore.kernel.org/bpf/20210615021342.7416-7-xiyou.wangcong@gmail.com


Conflicts:
	net/core/skmsg.c
Signed-off-by: default avatarZiyang Xuan <william.xuanziyang@huawei.com>
Reviewed-by: default avatarYue Haibing <yuehaibing@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 1ecde10d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment