tree:
https://github.com/rgushchin/linux.git bpf_memcg.4
head: d45b914fe800e2a8ec174017a193fbc08ea30c32
commit: 4790e514d4cc4913da25fe2173cca11169506499 [4/31] bpf: memcg-based memory accounting
for bpf maps
config: i386-randconfig-m021-20200809 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
kernel/bpf/helpers.c:64 __bpf_map_update_elem() error: uninitialized symbol
'old_memcg'.
vim +/old_memcg +64 kernel/bpf/helpers.c
44
45 #ifdef CONFIG_MEMCG_KMEM
46 static __always_inline int __bpf_map_update_elem(struct bpf_map *map, void *key,
47 void *value, u64 flags)
48 {
49 struct mem_cgroup *old_memcg;
50 int ret;
51
52 /*
53 * If update from an interrupt context results in a memory allocation,
54 * the memory cgroup to charge can't be determined from the context
55 * of the current task. Instead, we charge the memory cgroup, which
56 * contained a process created the map.
57 */
58 if (in_interrupt())
59 old_memcg = memalloc_use_memcg(map->memcg);
60
61 ret = map->ops->map_update_elem(map, key, value, flags);
62
63 if (in_interrupt())
64 memalloc_use_memcg(old_memcg);
65
66 return ret;
67 }
68 #else
69 static __always_inline int __bpf_map_update_elem(struct bpf_map *map, void *key,
70 void *value, u64 flags)
71 {
72 return map->ops->map_update_elem(map, key, value, flags);
73 }
74 #endif
75
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org