From: Hou Tao <houtao1@xxxxxxxxxx> Hi, The tiny patch set fixes the out-of-bound read problem when reading the fdinfo of sock map link fd. And in order to spot such omission early for the newly-added link type in the future, it also checks the validity of the link->type and adds a WARN_ONCE() for missed invocation. Please see individual patches for more details. And comments are always welcome. v3: * patch #2: check and warn the validity of link->type instead of adding a static assertion for bpf_link_type_strs array. v2: http://lore.kernel.org/bpf/d49fa2f4-f743-c763-7579-c3cab4dd88cb@xxxxxxxxxxxxxxx Hou Tao (2): bpf: Add the missing BPF_LINK_TYPE invocation for sockmap bpf: Check validity of link->type in bpf_link_show_fdinfo() include/linux/bpf_types.h | 1 + include/uapi/linux/bpf.h | 3 +++ kernel/bpf/syscall.c | 14 +++++++++----- tools/include/uapi/linux/bpf.h | 3 +++ 4 files changed, 16 insertions(+), 5 deletions(-) -- 2.29.2