Thread (20 messages) 20 messages, 6 authors, 2021-02-23

Re: [PATCH v4 bpf-next 2/6] bpf: prevent deadlock from recursive bpf_task_storage_[get|delete]

From: Peter Zijlstra <peterz@infradead.org>
Date: 2021-02-23 11:07:53
Also in: bpf, lkml

On Mon, Feb 22, 2021 at 05:20:10PM -0800, Song Liu wrote:
BPF helpers bpf_task_storage_[get|delete] could hold two locks:
bpf_local_storage_map_bucket->lock and bpf_local_storage->lock. Calling
these helpers from fentry/fexit programs on functions in bpf_*_storage.c
may cause deadlock on either locks.

Prevent such deadlock with a per cpu counter, bpf_task_storage_busy, which
is similar to bpf_prog_active. We need this counter to be global, because
So bpf_prog_active is one of the biggest turds around, and now you're
making it worse ?!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help