]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Update locking comment in hashtab code
authorThomas Gleixner <tglx@linutronix.de>
Mon, 24 Feb 2020 14:01:34 +0000 (15:01 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 25 Feb 2020 00:12:20 +0000 (16:12 -0800)
commitae7463892d1ee758fe9454e7a4996bb5b18adadb
tree1c700844ea53f82eec530d9fdf37d7776f9938df
parentb3088071b63f57e57156f28760cba1d526ad7bb2
bpf: Update locking comment in hashtab code

The comment where the bucket lock is acquired says:

  /* bpf_map_update_elem() can be called in_irq() */

which is not really helpful and aside of that it does not explain the
subtle details of the hash bucket locks expecially in the context of BPF
and perf, kprobes and tracing.

Add a comment at the top of the file which explains the protection scopes
and the details how potential deadlocks are prevented.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200224145642.755793061@linutronix.de
kernel/bpf/hashtab.c