Re: [PATCH net-next 4/8] bpf: Add BPF_PROG_GET_FD_BY_ID

2017-05-30 Thread kbuild test robot
Hi Martin, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Martin-KaFai-Lau/bpf-Introduce-bpf_prog-ID/20170531-110650 config: x86_64-randconfig-x015-201722 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save

[PATCH net-next 4/8] bpf: Add BPF_PROG_GET_FD_BY_ID

2017-05-30 Thread Martin KaFai Lau
Add BPF_PROG_GET_FD_BY_ID command to allow user to get a fd from a bpf_prog's ID. bpf_prog_inc_not_zero() is added and is called with prog_idr_lock held. __bpf_prog_put() is also added which has the 'bool do_idr_lock' param to decide if the prog_idr_lock should be acquired when freeing the prog->