mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
UPSTREAM: Revert "bpf: Fix potential call bpf_link_free() in atomic context"
This reverts commit 31f23a6a181c81543b10a1a9056b0e6c7ef1c747. This change made many selftests/bpf flaky: flow_dissector, sk_lookup, sk_assign and others. There was no issue in the code. Change-Id: Ie5b6dd3fccd567c52aa488ca619b2a6c6313d05f Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
parent
d86630a69e
commit
c7182e89c3
1 changed files with 6 additions and 2 deletions
|
|
@ -2342,8 +2342,12 @@ void bpf_link_put(struct bpf_link *link)
|
|||
if (!atomic64_dec_and_test(&link->refcnt))
|
||||
return;
|
||||
|
||||
INIT_WORK(&link->work, bpf_link_put_deferred);
|
||||
schedule_work(&link->work);
|
||||
if (in_atomic()) {
|
||||
INIT_WORK(&link->work, bpf_link_put_deferred);
|
||||
schedule_work(&link->work);
|
||||
} else {
|
||||
bpf_link_free(link);
|
||||
}
|
||||
}
|
||||
|
||||
static int bpf_link_release(struct inode *inode, struct file *filp)
|
||||
|
|
|
|||
Loading…
Reference in a new issue