tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 8f7c77eb69ee331fb66fad8eec5ca81b8843eaf3 commit: 8822f3476adadcf84c7cb3db0d1a0a39a6fdc398 [2437/7374] mm/dynamic_pool: introduce per-memcg memory pool config: arm64-randconfig-r132-20240412 (https://download.01.org/0day-ci/archive/20240412/202404120329.pEWUfaZU-lkp@i...) compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 8b3b4a92adee40483c27f26c478a384cd69c6f05) reproduce: (https://download.01.org/0day-ci/archive/20240412/202404120329.pEWUfaZU-lkp@i...)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202404120329.pEWUfaZU-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
mm/dynamic_pool.c:118:55: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct cgroup_subsys_state *css @@ got struct cgroup_subsys_state [noderef] __rcu * @@
mm/dynamic_pool.c:118:55: sparse: expected struct cgroup_subsys_state *css mm/dynamic_pool.c:118:55: sparse: got struct cgroup_subsys_state [noderef] __rcu *
vim +118 mm/dynamic_pool.c
115 116 int dynamic_pool_destroy(struct cgroup *cgrp, bool *clear_css_online) 117 {
118 struct cgroup_subsys_state *css = cgrp->subsys[memory_cgrp_id];
119 struct mem_cgroup *memcg = mem_cgroup_from_css(css); 120 struct dynamic_pool *dpool; 121 int ret = 0; 122 123 if (!dpool_enabled || !memcg) 124 return 0; 125 126 mutex_lock(&dpool_mutex); 127 dpool = dpool_get_from_memcg(memcg); 128 if (!dpool) 129 goto unlock; 130 131 if (dpool->memcg != memcg) { 132 memcg->dpool = NULL; 133 goto put; 134 } 135 136 /* A offline dpool is not allowed for allocation */ 137 dpool->online = false; 138 139 memcg->dpool = NULL; 140 141 /* Release the initial reference count */ 142 dpool_put(dpool); 143 144 /* 145 * Since dpool is destroyed and the memcg will be freed then, 146 * clear CSS_ONLINE immediately to prevent race with create. 147 */ 148 if (cgrp->self.flags & CSS_ONLINE) { 149 cgrp->self.flags &= ~CSS_ONLINE; 150 *clear_css_online = true; 151 } 152 153 put: 154 dpool_put(dpool); 155 unlock: 156 mutex_unlock(&dpool_mutex); 157 158 return ret; 159 } 160