On Tue, Aug 18, 2020 at 02:53:42PM +0200, Jakub Sitnicki wrote: > On Wed, Aug 12, 2020 at 06:33 PM CEST, Leah Rumancik wrote: > > +int io_filter_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog) > > +{ > > + struct gendisk *disk; > > + struct fd f; > > + struct bpf_prog_array *old_array; > > + struct bpf_prog_array *new_array; > > + int ret; > > + > > + if (attr->attach_flags) > > + return -EINVAL; > > + > > + f = fdget(attr->target_fd); > ^^^^^ > > Missing corresponding fdput? > > As per Martin's suggestion, with bpf_link this will become the > link_create callback, but the comment still stands. Yep, will add. Thanks, Leah