diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2023-12-06 17:03:50 -0800 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-12-06 17:03:50 -0800 |
commit | 0c92218f4e7d4b4a7245d32bea042fa6f9cc39d7 (patch) | |
tree | 44d6ba1879278a5a1b58178e9b0f799427e52e0e /kernel/bpf/memalloc.c | |
parent | b2f557a21bc8fffdcd65794eda8a854e024999f3 (diff) | |
parent | 33cc938e65a98f1d29d0a18403dbbee050dcad9a (diff) | |
download | lwn-0c92218f4e7d4b4a7245d32bea042fa6f9cc39d7.tar.gz lwn-0c92218f4e7d4b4a7245d32bea042fa6f9cc39d7.zip |
Merge branch 'master' into mm-hotfixes-stable
Diffstat (limited to 'kernel/bpf/memalloc.c')
-rw-r--r-- | kernel/bpf/memalloc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/bpf/memalloc.c b/kernel/bpf/memalloc.c index 63b909d277d4..6a51cfe4c2d6 100644 --- a/kernel/bpf/memalloc.c +++ b/kernel/bpf/memalloc.c @@ -978,6 +978,8 @@ void notrace *bpf_mem_cache_alloc_flags(struct bpf_mem_alloc *ma, gfp_t flags) memcg = get_memcg(c); old_memcg = set_active_memcg(memcg); ret = __alloc(c, NUMA_NO_NODE, GFP_KERNEL | __GFP_NOWARN | __GFP_ACCOUNT); + if (ret) + *(struct bpf_mem_cache **)ret = c; set_active_memcg(old_memcg); mem_cgroup_put(memcg); } |