]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bpf, sockmap: Fix map type error in sock_map_del_link
authorXu Kuohai <xukuohai@huawei.com>
Fri, 4 Aug 2023 07:37:37 +0000 (03:37 -0400)
committerMartin KaFai Lau <martin.lau@kernel.org>
Thu, 10 Aug 2023 03:29:02 +0000 (20:29 -0700)
commit7e96ec0e6605b69bb21bbf6c0ff9051e656ec2b1
treeae21d2241e4c6551ca0041e433773283a13e7131
parent85c2c79a07302fe68a1ad5cc449458cc559e314d
bpf, sockmap: Fix map type error in sock_map_del_link

sock_map_del_link() operates on both SOCKMAP and SOCKHASH, although
both types have member named "progs", the offset of "progs" member in
these two types is different, so "progs" should be accessed with the
real map type.

Fixes: 604326b41a6f ("bpf, sockmap: convert to generic sk_msg interface")
Signed-off-by: Xu Kuohai <xukuohai@huawei.com>
Reviewed-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/r/20230804073740.194770-2-xukuohai@huaweicloud.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
net/core/sock_map.c