bpf, sockmap: Fix map type error in sock_map_del_link
mainline inclusion from mainline-v6.5-rc6 commit 7e96ec0e category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7DNAP CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7e96ec0e6605b69bb21bbf6c0ff9051e656ec2b1 -------------------------------- 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: 604326b4 ("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> Signed-off-by:
Liu Jian <liujian56@huawei.com> Conflicts: net/core/sock_map.c
Loading
Please sign in to comment