diff options
author | Johannes Berg <johannes.berg@intel.com> | 2022-10-10 12:03:31 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2022-10-10 12:03:43 +0300 |
commit | dfd2d876b3fda1790bc0239ba4c6967e25d16e91 (patch) | |
tree | 45c2ec4b25afdf7b521dec642f6b75112bb401a3 /kernel/bpf/memalloc.c | |
parent | a790cc3a4fad75048295571a350b95b87e022a5a (diff) | |
parent | 10d5ea5a436da8d60cdb5845f454d595accdbce0 (diff) | |
download | linux-dfd2d876b3fda1790bc0239ba4c6967e25d16e91.tar.xz |
Merge remote-tracking branch 'wireless/main' into wireless-next
Pull in wireless/main content since some new code would
otherwise conflict with it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'kernel/bpf/memalloc.c')
-rw-r--r-- | kernel/bpf/memalloc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/bpf/memalloc.c b/kernel/bpf/memalloc.c index 5cc952da7d41..5f83be1d2018 100644 --- a/kernel/bpf/memalloc.c +++ b/kernel/bpf/memalloc.c @@ -277,7 +277,8 @@ static void free_bulk(struct bpf_mem_cache *c) local_dec(&c->active); if (IS_ENABLED(CONFIG_PREEMPT_RT)) local_irq_restore(flags); - enque_to_free(c, llnode); + if (llnode) + enque_to_free(c, llnode); } while (cnt > (c->high_watermark + c->low_watermark) / 2); /* and drain free_llist_extra */ @@ -610,7 +611,7 @@ void notrace bpf_mem_free(struct bpf_mem_alloc *ma, void *ptr) if (!ptr) return; - idx = bpf_mem_cache_idx(__ksize(ptr - LLIST_NODE_SZ)); + idx = bpf_mem_cache_idx(ksize(ptr - LLIST_NODE_SZ)); if (idx < 0) return; |