Hello. On Mon, Sep 23, 2024 at 11:43:50AM GMT, Chen Ridong <chenridong@xxxxxxxxxxxxxxx> wrote: > +static int __init cgroup_bpf_wq_init(void) > +{ > + cgroup_bpf_destroy_wq = alloc_workqueue("cgroup_bpf_destroy", 0, 1); > + WARN_ON_ONCE(!cgroup_bpf_destroy_wq); > + return 0; > +} > +core_initcall(cgroup_bpf_wq_init); I think hard fail (panic() if you want to avoid BUG_ON) would be warranted here and mere warning would leave system exposed to worse errors later (and _ONCE in an initcall looks unnecessary). Maybe look at other global wqs. I see that returning -ENOMEM might be an option, however, I don't see that initcall's return value would be processed anywhere currently :-/ Besides this allocation failpath this is a sensible change to me. Thanks, Michal
Attachment:
signature.asc
Description: PGP signature