On Thu, Jun 1, 2023 at 1:19 PM Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote: > > On Thu, 1 Jun 2023 14:29:13 +0800 kernel test robot <lkp@xxxxxxxxx> wrote: > > > if (objcg && !obj_cgroup_may_zswap(objcg)) > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > mm/zswap.c:1327:9: note: uninitialized use occurs here > > return ret; > > ^~~ > > mm/zswap.c:1183:2: note: remove the 'if' if its condition is always false > > if (objcg && !obj_cgroup_may_zswap(objcg)) > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > mm/zswap.c:1158:9: note: initialize the variable 'ret' to silence this warning > > int ret; > > ^ > > Thanks. I did the below. Maybe ENOMEM would be more appropriate... https://lore.kernel.org/llvm/20230601-zswap-cgroup-wsometimes-uninitialized-v2-1-84912684ac35@xxxxxxxxxx/ > > --- a/mm/zswap.c~zswap-do-not-shrink-if-cgroup-may-not-zswap-fix > +++ a/mm/zswap.c > @@ -1180,8 +1180,10 @@ static int zswap_frontswap_store(unsigne > * local cgroup limits. > */ > objcg = get_obj_cgroup_from_page(page); > - if (objcg && !obj_cgroup_may_zswap(objcg)) > + if (objcg && !obj_cgroup_may_zswap(objcg)) { > + ret = -ENOSPC; > goto reject; > + } > > /* reclaim space if needed */ > if (zswap_is_full()) { > _ > > -- Thanks, ~Nick Desaulniers