mbox series

[bpf,0/2] Wait for busy refill_work when destorying bpf memory allocator

Message ID 20221019115539.983394-1-houtao@huaweicloud.com (mailing list archive)
Headers show
Series Wait for busy refill_work when destorying bpf memory allocator | expand

Message

Hou Tao Oct. 19, 2022, 11:55 a.m. UTC
From: Hou Tao <houtao1@huawei.com>

Hi,

The patchset aims to fix the problem of bpf memory allocator destruction
when there is PREEMPT_RT kernel or kernel with arch_irq_work_has_interrupt()
being false (e.g. 1-cpu arm32 host). The root cause is that there may be
busy refill_work when the allocator is destorying and it may incur oops
or other problems as shown in patch #1. Patch #1 fixes the problem by
waiting for the completion of irq work during destorying and patch #2
is just a clean-up patch based on patch #1. Please see individual
patches for more details.

Comments are always welcome.

Hou Tao (2):
  bpf: Wait for busy refill_work when destorying bpf memory allocator
  bpf: Use __llist_del_all() whenever possbile during memory draining

 kernel/bpf/memalloc.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)