On Tue, Jul 5, 2022 at 9:24 PM Roman Gushchin <roman.gushchin@xxxxxxxxx> wrote: > > Anyway, here is the patch for reparenting bpf maps: > https://github.com/rgushchin/linux/commit/f57df8bb35770507a4624fe52216b6c14f39c50c > > I gonna post it to bpf@ after some testing. Please do. It looks good. It needs #ifdef CONFIG_MEMCG_KMEM because get_obj_cgroup_from_current() is undefined otherwise. Ideally just adding a static inline to a .h ? and if (map->objcg) memcg = get_mem_cgroup_from_objcg(map->objcg); or !NULL check inside get_mem_cgroup_from_objcg() which would be better.