]> git.baikalelectronics.ru Git - kernel.git/commit
samples/bpf: Detach xdp prog when program exits unexpectedly in xdp_rxq_info_user
authorZhengchao Shao <shaozhengchao@huawei.com>
Wed, 27 Apr 2022 06:23:38 +0000 (14:23 +0800)
committerAndrii Nakryiko <andrii@kernel.org>
Thu, 28 Apr 2022 02:07:42 +0000 (19:07 -0700)
commit5df8c3c7205383f5979bd5ead746ec1e198a0d9a
treeb8f4397e0970bced7bd13482b3fb8377e9223660
parent7017bcf3f6a422755e13fb27370978ebd26aa8ce
samples/bpf: Detach xdp prog when program exits unexpectedly in xdp_rxq_info_user

When xdp_rxq_info_user program exits unexpectedly, it doesn't detach xdp
prog of device, and other xdp prog can't be attached to the device. So
call init_exit() to detach xdp prog when program exits unexpectedly.

Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220427062338.80173-1-shaozhengchao@huawei.com
samples/bpf/xdp_rxq_info_user.c