lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 3 Feb 2022 22:06:15 +0800
From:   kernel test robot <lkp@...el.com>
To:     Huang Ying <ying.huang@...el.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [hying-caritas:mt-20210701 33/56] mm/vmscan.c:2261:46: sparse:
 sparse: mixing different enum types:

tree:   https://github.com/hying-caritas/linux.git mt-20210701
head:   491dd52981b1acfc3638b3780d85ee68113fd51b
commit: 19f3e3d17bb9b4096c84f6f5e7842dbfd3c1132c [33/56] mm: make some global page reclaim related vmstat events per-node
config: m68k-randconfig-s032-20220202 (https://download.01.org/0day-ci/archive/20220203/202202031841.nnBVqqFb-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 11.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://github.com/hying-caritas/linux/commit/19f3e3d17bb9b4096c84f6f5e7842dbfd3c1132c
        git remote add hying-caritas https://github.com/hying-caritas/linux.git
        git fetch --no-tags hying-caritas mt-20210701
        git checkout 19f3e3d17bb9b4096c84f6f5e7842dbfd3c1132c
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=m68k SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>


sparse warnings: (new ones prefixed by >>)
>> mm/vmscan.c:2261:46: sparse: sparse: mixing different enum types:
>> mm/vmscan.c:2261:46: sparse:    unsigned int enum vm_event_item
>> mm/vmscan.c:2261:46: sparse:    unsigned int enum node_stat_item
   mm/vmscan.c:2278:46: sparse: sparse: mixing different enum types:
   mm/vmscan.c:2278:46: sparse:    unsigned int enum vm_event_item
   mm/vmscan.c:2278:46: sparse:    unsigned int enum node_stat_item
   mm/vmscan.c: note: in included file:
   include/linux/mm_inline.h:66:38: sparse: sparse: context imbalance in 'isolate_lru_page' - unexpected unlock
   mm/vmscan.c: note: in included file (through include/linux/swap.h):
   include/linux/memcontrol.h:1527:39: sparse: sparse: context imbalance in 'check_move_unevictable_pages' - unexpected unlock

vim +2261 mm/vmscan.c

  2219	
  2220	/*
  2221	 * shrink_inactive_list() is a helper for shrink_node().  It returns the number
  2222	 * of reclaimed pages
  2223	 */
  2224	static noinline_for_stack unsigned long
  2225	shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec,
  2226			     struct scan_control *sc, enum lru_list lru)
  2227	{
  2228		LIST_HEAD(page_list);
  2229		unsigned long nr_scanned;
  2230		unsigned int nr_reclaimed = 0;
  2231		unsigned long nr_taken;
  2232		struct reclaim_stat stat;
  2233		bool file = is_file_lru(lru);
  2234		enum vm_event_item item;
  2235		struct pglist_data *pgdat = lruvec_pgdat(lruvec);
  2236		bool stalled = false;
  2237	
  2238		while (unlikely(too_many_isolated(pgdat, file, sc))) {
  2239			if (stalled)
  2240				return 0;
  2241	
  2242			/* wait a bit for the reclaimer. */
  2243			msleep(100);
  2244			stalled = true;
  2245	
  2246			/* We are about to die and free our memory. Return now. */
  2247			if (fatal_signal_pending(current))
  2248				return SWAP_CLUSTER_MAX;
  2249		}
  2250	
  2251		lru_add_drain();
  2252	
  2253		spin_lock_irq(&lruvec->lru_lock);
  2254	
  2255		nr_taken = isolate_lru_pages(nr_to_scan, lruvec, &page_list,
  2256					     &nr_scanned, sc, lru);
  2257	
  2258		__mod_node_page_state(pgdat, NR_ISOLATED_ANON + file, nr_taken);
  2259		item = current_is_kswapd() ? PGSCAN_KSWAPD : PGSCAN_DIRECT;
  2260		if (!cgroup_reclaim(sc))
> 2261			__mod_node_page_state(pgdat, item, nr_scanned);
  2262		__mod_memcg_state(lruvec_memcg(lruvec), item, nr_scanned);
  2263		__count_vm_events(PGSCAN_ANON + file, nr_scanned);
  2264	
  2265		spin_unlock_irq(&lruvec->lru_lock);
  2266	
  2267		if (nr_taken == 0)
  2268			return 0;
  2269	
  2270		nr_reclaimed = shrink_page_list(&page_list, pgdat, sc, &stat, false);
  2271	
  2272		spin_lock_irq(&lruvec->lru_lock);
  2273		move_pages_to_lru(lruvec, &page_list);
  2274	
  2275		__mod_node_page_state(pgdat, NR_ISOLATED_ANON + file, -nr_taken);
  2276		item = current_is_kswapd() ? PGSTEAL_KSWAPD : PGSTEAL_DIRECT;
  2277		if (!cgroup_reclaim(sc))
  2278			__mod_node_page_state(pgdat, item, nr_reclaimed);
  2279		__mod_memcg_state(lruvec_memcg(lruvec), item, nr_reclaimed);
  2280		__count_vm_events(PGSTEAL_ANON + file, nr_reclaimed);
  2281		spin_unlock_irq(&lruvec->lru_lock);
  2282	
  2283		lru_note_cost(lruvec, file, stat.nr_pageout);
  2284		mem_cgroup_uncharge_list(&page_list);
  2285		free_unref_page_list(&page_list);
  2286	
  2287		/*
  2288		 * If dirty pages are scanned that are not queued for IO, it
  2289		 * implies that flushers are not doing their job. This can
  2290		 * happen when memory pressure pushes dirty pages to the end of
  2291		 * the LRU before the dirty limits are breached and the dirty
  2292		 * data has expired. It can also happen when the proportion of
  2293		 * dirty pages grows not through writes but through memory
  2294		 * pressure reclaiming all the clean cache. And in some cases,
  2295		 * the flushers simply cannot keep up with the allocation
  2296		 * rate. Nudge the flusher threads in case they are asleep.
  2297		 */
  2298		if (stat.nr_unqueued_dirty == nr_taken)
  2299			wakeup_flusher_threads(WB_REASON_VMSCAN);
  2300	
  2301		sc->nr.dirty += stat.nr_dirty;
  2302		sc->nr.congested += stat.nr_congested;
  2303		sc->nr.unqueued_dirty += stat.nr_unqueued_dirty;
  2304		sc->nr.writeback += stat.nr_writeback;
  2305		sc->nr.immediate += stat.nr_immediate;
  2306		sc->nr.taken += nr_taken;
  2307		if (file)
  2308			sc->nr.file_taken += nr_taken;
  2309	
  2310		trace_mm_vmscan_lru_shrink_inactive(pgdat->node_id,
  2311				nr_scanned, nr_reclaimed, &stat, sc->priority, file);
  2312		return nr_reclaimed;
  2313	}
  2314	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ