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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 31 Oct 2021 00:24:05 +0800
From:   kernel test robot <lkp@...el.com>
To:     Christoph Hellwig <hch@....de>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Jens Axboe <axboe@...nel.dk>
Subject: [axboe-block:for-5.16/passthrough-flag 136/159]
 fs/fs-writeback.c:1896:15: error: 'struct task_struct' has no member named
 'plug'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-5.16/passthrough-flag
head:   0bf6d96cb8294094ce1e44cbe8cf65b0899d0a3a
commit: 008f75a20e7072d0840ec323c39b42206f3fa8a0 [136/159] block: cleanup the flush plug helpers
config: x86_64-randconfig-s022-20211028 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?id=008f75a20e7072d0840ec323c39b42206f3fa8a0
        git remote add axboe-block https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
        git fetch --no-tags axboe-block for-5.16/passthrough-flag
        git checkout 008f75a20e7072d0840ec323c39b42206f3fa8a0
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   fs/fs-writeback.c: In function 'writeback_sb_inodes':
>> fs/fs-writeback.c:1896:15: error: 'struct task_struct' has no member named 'plug'
    1896 |    if (current->plug)
         |               ^~
   fs/fs-writeback.c:1897:27: error: 'struct task_struct' has no member named 'plug'
    1897 |     blk_flush_plug(current->plug, false);
         |                           ^~
   fs/fs-writeback.c: In function 'wakeup_flusher_threads':
   fs/fs-writeback.c:2295:25: error: 'struct task_struct' has no member named 'plug'
    2295 |   blk_flush_plug(current->plug, true);
         |                         ^~
--
   kernel/sched/core.c:3416:6: warning: no previous prototype for 'sched_set_stop_task' [-Wmissing-prototypes]
    3416 | void sched_set_stop_task(int cpu, struct task_struct *stop)
         |      ^~~~~~~~~~~~~~~~~~~
   kernel/sched/core.c: In function 'sched_submit_work':
>> kernel/sched/core.c:6346:21: error: 'struct task_struct' has no member named 'plug'
    6346 |   blk_flush_plug(tsk->plug, true);
         |                     ^~
   kernel/sched/core.c: In function 'io_schedule_prepare':
   kernel/sched/core.c:8357:13: error: 'struct task_struct' has no member named 'plug'
    8357 |  if (current->plug)
         |             ^~
   kernel/sched/core.c:8358:25: error: 'struct task_struct' has no member named 'plug'
    8358 |   blk_flush_plug(current->plug, true);
         |                         ^~


vim +1896 fs/fs-writeback.c

  1779	
  1780	/*
  1781	 * Write a portion of b_io inodes which belong to @sb.
  1782	 *
  1783	 * Return the number of pages and/or inodes written.
  1784	 *
  1785	 * NOTE! This is called with wb->list_lock held, and will
  1786	 * unlock and relock that for each inode it ends up doing
  1787	 * IO for.
  1788	 */
  1789	static long writeback_sb_inodes(struct super_block *sb,
  1790					struct bdi_writeback *wb,
  1791					struct wb_writeback_work *work)
  1792	{
  1793		struct writeback_control wbc = {
  1794			.sync_mode		= work->sync_mode,
  1795			.tagged_writepages	= work->tagged_writepages,
  1796			.for_kupdate		= work->for_kupdate,
  1797			.for_background		= work->for_background,
  1798			.for_sync		= work->for_sync,
  1799			.range_cyclic		= work->range_cyclic,
  1800			.range_start		= 0,
  1801			.range_end		= LLONG_MAX,
  1802		};
  1803		unsigned long start_time = jiffies;
  1804		long write_chunk;
  1805		long wrote = 0;  /* count both pages and inodes */
  1806	
  1807		while (!list_empty(&wb->b_io)) {
  1808			struct inode *inode = wb_inode(wb->b_io.prev);
  1809			struct bdi_writeback *tmp_wb;
  1810	
  1811			if (inode->i_sb != sb) {
  1812				if (work->sb) {
  1813					/*
  1814					 * We only want to write back data for this
  1815					 * superblock, move all inodes not belonging
  1816					 * to it back onto the dirty list.
  1817					 */
  1818					redirty_tail(inode, wb);
  1819					continue;
  1820				}
  1821	
  1822				/*
  1823				 * The inode belongs to a different superblock.
  1824				 * Bounce back to the caller to unpin this and
  1825				 * pin the next superblock.
  1826				 */
  1827				break;
  1828			}
  1829	
  1830			/*
  1831			 * Don't bother with new inodes or inodes being freed, first
  1832			 * kind does not need periodic writeout yet, and for the latter
  1833			 * kind writeout is handled by the freer.
  1834			 */
  1835			spin_lock(&inode->i_lock);
  1836			if (inode->i_state & (I_NEW | I_FREEING | I_WILL_FREE)) {
  1837				redirty_tail_locked(inode, wb);
  1838				spin_unlock(&inode->i_lock);
  1839				continue;
  1840			}
  1841			if ((inode->i_state & I_SYNC) && wbc.sync_mode != WB_SYNC_ALL) {
  1842				/*
  1843				 * If this inode is locked for writeback and we are not
  1844				 * doing writeback-for-data-integrity, move it to
  1845				 * b_more_io so that writeback can proceed with the
  1846				 * other inodes on s_io.
  1847				 *
  1848				 * We'll have another go at writing back this inode
  1849				 * when we completed a full scan of b_io.
  1850				 */
  1851				spin_unlock(&inode->i_lock);
  1852				requeue_io(inode, wb);
  1853				trace_writeback_sb_inodes_requeue(inode);
  1854				continue;
  1855			}
  1856			spin_unlock(&wb->list_lock);
  1857	
  1858			/*
  1859			 * We already requeued the inode if it had I_SYNC set and we
  1860			 * are doing WB_SYNC_NONE writeback. So this catches only the
  1861			 * WB_SYNC_ALL case.
  1862			 */
  1863			if (inode->i_state & I_SYNC) {
  1864				/* Wait for I_SYNC. This function drops i_lock... */
  1865				inode_sleep_on_writeback(inode);
  1866				/* Inode may be gone, start again */
  1867				spin_lock(&wb->list_lock);
  1868				continue;
  1869			}
  1870			inode->i_state |= I_SYNC;
  1871			wbc_attach_and_unlock_inode(&wbc, inode);
  1872	
  1873			write_chunk = writeback_chunk_size(wb, work);
  1874			wbc.nr_to_write = write_chunk;
  1875			wbc.pages_skipped = 0;
  1876	
  1877			/*
  1878			 * We use I_SYNC to pin the inode in memory. While it is set
  1879			 * evict_inode() will wait so the inode cannot be freed.
  1880			 */
  1881			__writeback_single_inode(inode, &wbc);
  1882	
  1883			wbc_detach_inode(&wbc);
  1884			work->nr_pages -= write_chunk - wbc.nr_to_write;
  1885			wrote += write_chunk - wbc.nr_to_write;
  1886	
  1887			if (need_resched()) {
  1888				/*
  1889				 * We're trying to balance between building up a nice
  1890				 * long list of IOs to improve our merge rate, and
  1891				 * getting those IOs out quickly for anyone throttling
  1892				 * in balance_dirty_pages().  cond_resched() doesn't
  1893				 * unplug, so get our IOs out the door before we
  1894				 * give up the CPU.
  1895				 */
> 1896				if (current->plug)
  1897					blk_flush_plug(current->plug, false);
  1898				cond_resched();
  1899			}
  1900	
  1901			/*
  1902			 * Requeue @inode if still dirty.  Be careful as @inode may
  1903			 * have been switched to another wb in the meantime.
  1904			 */
  1905			tmp_wb = inode_to_wb_and_lock_list(inode);
  1906			spin_lock(&inode->i_lock);
  1907			if (!(inode->i_state & I_DIRTY_ALL))
  1908				wrote++;
  1909			requeue_inode(inode, tmp_wb, &wbc);
  1910			inode_sync_complete(inode);
  1911			spin_unlock(&inode->i_lock);
  1912	
  1913			if (unlikely(tmp_wb != wb)) {
  1914				spin_unlock(&tmp_wb->list_lock);
  1915				spin_lock(&wb->list_lock);
  1916			}
  1917	
  1918			/*
  1919			 * bail out to wb_writeback() often enough to check
  1920			 * background threshold and other termination conditions.
  1921			 */
  1922			if (wrote) {
  1923				if (time_is_before_jiffies(start_time + HZ / 10UL))
  1924					break;
  1925				if (work->nr_pages <= 0)
  1926					break;
  1927			}
  1928		}
  1929		return wrote;
  1930	}
  1931	

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

Download attachment ".config.gz" of type "application/gzip" (37628 bytes)

Powered by blists - more mailing lists