* [rgushchin:kmem_performance.1 4/7] mm/memcontrol.c:3016:17: sparse: sparse: Using plain integer as NULL pointer
@ 2023-10-01 5:46 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-10-01 5:46 UTC (permalink / raw
To: Roman Gushchin; +Cc: oe-kbuild-all
tree: https://github.com/rgushchin/linux.git kmem_performance.1
head: 4ce474b7270a507dd448b335168acb30e9fe7d46
commit: 1b638f41428889e8e7ab15b64939d9ceeeabfbd5 [4/7] mm: kmem: add direct objcg pointer to task_struct
config: x86_64-randconfig-123-20230930 (https://download.01.org/0day-ci/archive/20231001/202310011333.iSgIn8LO-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231001/202310011333.iSgIn8LO-lkp@intel.com/reproduce)
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/202310011333.iSgIn8LO-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> mm/memcontrol.c:3016:17: sparse: sparse: Using plain integer as NULL pointer
mm/memcontrol.c:3032:23: sparse: sparse: Using plain integer as NULL pointer
mm/memcontrol.c:4242:21: sparse: sparse: incompatible types in comparison expression (different address spaces):
mm/memcontrol.c:4242:21: sparse: struct mem_cgroup_threshold_ary [noderef] __rcu *
mm/memcontrol.c:4242:21: sparse: struct mem_cgroup_threshold_ary *
mm/memcontrol.c:4244:21: sparse: sparse: incompatible types in comparison expression (different address spaces):
mm/memcontrol.c:4244:21: sparse: struct mem_cgroup_threshold_ary [noderef] __rcu *
mm/memcontrol.c:4244:21: sparse: struct mem_cgroup_threshold_ary *
mm/memcontrol.c:4400:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
mm/memcontrol.c:4400:9: sparse: struct mem_cgroup_threshold_ary [noderef] __rcu *
mm/memcontrol.c:4400:9: sparse: struct mem_cgroup_threshold_ary *
mm/memcontrol.c:4494:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
mm/memcontrol.c:4494:9: sparse: struct mem_cgroup_threshold_ary [noderef] __rcu *
mm/memcontrol.c:4494:9: sparse: struct mem_cgroup_threshold_ary *
mm/memcontrol.c:6206:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
mm/memcontrol.c:6206:23: sparse: struct task_struct [noderef] __rcu *
mm/memcontrol.c:6206:23: sparse: struct task_struct *
mm/memcontrol.c:6443:52: sparse: sparse: incompatible types in comparison expression (different address spaces):
mm/memcontrol.c:6443:52: sparse: struct task_struct [noderef] __rcu *
mm/memcontrol.c:6443:52: sparse: struct task_struct *
mm/memcontrol.c: note: in included file:
include/linux/memcontrol.h:761:9: sparse: sparse: context imbalance in 'folio_lruvec_lock' - wrong count at exit
include/linux/memcontrol.h:761:9: sparse: sparse: context imbalance in 'folio_lruvec_lock_irq' - wrong count at exit
include/linux/memcontrol.h:761:9: sparse: sparse: context imbalance in 'folio_lruvec_lock_irqsave' - wrong count at exit
mm/memcontrol.c:2095:6: sparse: sparse: context imbalance in 'folio_memcg_lock' - wrong count at exit
mm/memcontrol.c:2142:17: sparse: sparse: context imbalance in '__folio_memcg_unlock' - unexpected unlock
mm/memcontrol.c:6056:28: sparse: sparse: context imbalance in 'mem_cgroup_count_precharge_pte_range' - unexpected unlock
mm/memcontrol.c:6251:36: sparse: sparse: context imbalance in 'mem_cgroup_move_charge_pte_range' - unexpected unlock
vim +3016 mm/memcontrol.c
3003
3004 static struct obj_cgroup *current_objcg_update(struct obj_cgroup *old)
3005 {
3006 struct mem_cgroup *memcg;
3007 struct obj_cgroup *objcg = NULL, *tmp = old;
3008
3009 old = current_objcg_without_update_flag(old);
3010 if (old)
3011 obj_cgroup_put(old);
3012
3013 rcu_read_lock();
3014 do {
3015 /* Atomically drop the update bit, */
> 3016 WARN_ON_ONCE(cmpxchg(¤t->objcg, tmp, 0) != tmp);
3017
3018 /* ...obtain the new objcg pointer */
3019 memcg = mem_cgroup_from_task(current);
3020 for (; memcg != root_mem_cgroup; memcg = parent_mem_cgroup(memcg)) {
3021 objcg = rcu_dereference(memcg->objcg);
3022 if (objcg && obj_cgroup_tryget(objcg))
3023 break;
3024 objcg = NULL;
3025 }
3026
3027 /*
3028 * ...and try atomically set up a new objcg pointer. If it
3029 * fails, it means the update flag was set concurrently, so
3030 * the whole procedure should be repeated.
3031 */
3032 tmp = 0;
3033 } while (!try_cmpxchg(¤t->objcg, &tmp, objcg));
3034 rcu_read_unlock();
3035
3036 return objcg;
3037 }
3038
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* [rgushchin:kmem_performance.1 4/7] mm/memcontrol.c:3016:17: sparse: sparse: Using plain integer as NULL pointer
@ 2023-10-11 15:59 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-10-11 15:59 UTC (permalink / raw
To: Roman Gushchin; +Cc: oe-kbuild-all
tree: https://github.com/rgushchin/linux.git kmem_performance.1
head: 4ce474b7270a507dd448b335168acb30e9fe7d46
commit: 1b638f41428889e8e7ab15b64939d9ceeeabfbd5 [4/7] mm: kmem: add direct objcg pointer to task_struct
config: x86_64-randconfig-123-20230930 (https://download.01.org/0day-ci/archive/20231011/202310112350.UJ6bHCq8-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231011/202310112350.UJ6bHCq8-lkp@intel.com/reproduce)
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/202310112350.UJ6bHCq8-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> mm/memcontrol.c:3016:17: sparse: sparse: Using plain integer as NULL pointer
mm/memcontrol.c:3032:23: sparse: sparse: Using plain integer as NULL pointer
mm/memcontrol.c:4242:21: sparse: sparse: incompatible types in comparison expression (different address spaces):
mm/memcontrol.c:4242:21: sparse: struct mem_cgroup_threshold_ary [noderef] __rcu *
mm/memcontrol.c:4242:21: sparse: struct mem_cgroup_threshold_ary *
mm/memcontrol.c:4244:21: sparse: sparse: incompatible types in comparison expression (different address spaces):
mm/memcontrol.c:4244:21: sparse: struct mem_cgroup_threshold_ary [noderef] __rcu *
mm/memcontrol.c:4244:21: sparse: struct mem_cgroup_threshold_ary *
mm/memcontrol.c:4400:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
mm/memcontrol.c:4400:9: sparse: struct mem_cgroup_threshold_ary [noderef] __rcu *
mm/memcontrol.c:4400:9: sparse: struct mem_cgroup_threshold_ary *
mm/memcontrol.c:4494:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
mm/memcontrol.c:4494:9: sparse: struct mem_cgroup_threshold_ary [noderef] __rcu *
mm/memcontrol.c:4494:9: sparse: struct mem_cgroup_threshold_ary *
mm/memcontrol.c:6206:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
mm/memcontrol.c:6206:23: sparse: struct task_struct [noderef] __rcu *
mm/memcontrol.c:6206:23: sparse: struct task_struct *
mm/memcontrol.c:6443:52: sparse: sparse: incompatible types in comparison expression (different address spaces):
mm/memcontrol.c:6443:52: sparse: struct task_struct [noderef] __rcu *
mm/memcontrol.c:6443:52: sparse: struct task_struct *
mm/memcontrol.c: note: in included file:
include/linux/memcontrol.h:761:9: sparse: sparse: context imbalance in 'folio_lruvec_lock' - wrong count at exit
include/linux/memcontrol.h:761:9: sparse: sparse: context imbalance in 'folio_lruvec_lock_irq' - wrong count at exit
include/linux/memcontrol.h:761:9: sparse: sparse: context imbalance in 'folio_lruvec_lock_irqsave' - wrong count at exit
mm/memcontrol.c:2095:6: sparse: sparse: context imbalance in 'folio_memcg_lock' - wrong count at exit
mm/memcontrol.c:2142:17: sparse: sparse: context imbalance in '__folio_memcg_unlock' - unexpected unlock
mm/memcontrol.c:6056:28: sparse: sparse: context imbalance in 'mem_cgroup_count_precharge_pte_range' - unexpected unlock
mm/memcontrol.c:6251:36: sparse: sparse: context imbalance in 'mem_cgroup_move_charge_pte_range' - unexpected unlock
vim +3016 mm/memcontrol.c
3003
3004 static struct obj_cgroup *current_objcg_update(struct obj_cgroup *old)
3005 {
3006 struct mem_cgroup *memcg;
3007 struct obj_cgroup *objcg = NULL, *tmp = old;
3008
3009 old = current_objcg_without_update_flag(old);
3010 if (old)
3011 obj_cgroup_put(old);
3012
3013 rcu_read_lock();
3014 do {
3015 /* Atomically drop the update bit, */
> 3016 WARN_ON_ONCE(cmpxchg(¤t->objcg, tmp, 0) != tmp);
3017
3018 /* ...obtain the new objcg pointer */
3019 memcg = mem_cgroup_from_task(current);
3020 for (; memcg != root_mem_cgroup; memcg = parent_mem_cgroup(memcg)) {
3021 objcg = rcu_dereference(memcg->objcg);
3022 if (objcg && obj_cgroup_tryget(objcg))
3023 break;
3024 objcg = NULL;
3025 }
3026
3027 /*
3028 * ...and try atomically set up a new objcg pointer. If it
3029 * fails, it means the update flag was set concurrently, so
3030 * the whole procedure should be repeated.
3031 */
3032 tmp = 0;
3033 } while (!try_cmpxchg(¤t->objcg, &tmp, objcg));
3034 rcu_read_unlock();
3035
3036 return objcg;
3037 }
3038
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-11 16:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-01 5:46 [rgushchin:kmem_performance.1 4/7] mm/memcontrol.c:3016:17: sparse: sparse: Using plain integer as NULL pointer kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2023-10-11 15:59 kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.