All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org
Subject: Re: [RFC PATCH 5/5] ovl: impement containerized syncfs for overlayfs
Date: Mon, 12 Oct 2020 15:31:47 +0300	[thread overview]
Message-ID: <20201012123147.GS1042@kadam> (raw)
In-Reply-To: <20201010142355.741645-6-cgxu519@mykernel.net>

[-- Attachment #1: Type: text/plain, Size: 3506 bytes --]

Hi Chengguang,

url:    https://github.com/0day-ci/linux/commits/Chengguang-Xu/implement-containerized-syncfs-for-overlayfs/20201011-071405
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git overlayfs-next
config: i386-randconfig-m021-20201011 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
fs/overlayfs/super.c:293 ovl_sync_fs() error: uninitialized symbol 'ret'.

vim +/ret +293 fs/overlayfs/super.c

e593b2bf513dd4d Amir Goldstein        2017-01-23  261  static int ovl_sync_fs(struct super_block *sb, int wait)
e593b2bf513dd4d Amir Goldstein        2017-01-23  262  {
ad204488d3046b3 Miklos Szeredi        2017-11-10  263  	struct ovl_fs *ofs = sb->s_fs_info;
e593b2bf513dd4d Amir Goldstein        2017-01-23  264  	struct super_block *upper_sb;
e593b2bf513dd4d Amir Goldstein        2017-01-23  265  	int ret;
e593b2bf513dd4d Amir Goldstein        2017-01-23  266  
08f4c7c86d4cf12 Miklos Szeredi        2020-06-04  267  	if (!ovl_upper_mnt(ofs))
e593b2bf513dd4d Amir Goldstein        2017-01-23  268  		return 0;
e8d4bfe3a715372 Chengguang Xu         2017-11-29  269  
c86243b090bc25f Vivek Goyal           2020-08-31  270  	if (!ovl_should_sync(ofs))
c86243b090bc25f Vivek Goyal           2020-08-31  271  		return 0;
e8d4bfe3a715372 Chengguang Xu         2017-11-29  272  	/*
32b1924b210a70d Konstantin Khlebnikov 2020-04-09  273  	 * Not called for sync(2) call or an emergency sync (SB_I_SKIP_SYNC).
32b1924b210a70d Konstantin Khlebnikov 2020-04-09  274  	 * All the super blocks will be iterated, including upper_sb.
e8d4bfe3a715372 Chengguang Xu         2017-11-29  275  	 *
e8d4bfe3a715372 Chengguang Xu         2017-11-29  276  	 * If this is a syncfs(2) call, then we do need to call
e8d4bfe3a715372 Chengguang Xu         2017-11-29  277  	 * sync_filesystem() on upper_sb, but enough if we do it when being
e8d4bfe3a715372 Chengguang Xu         2017-11-29  278  	 * called with wait == 1.
e8d4bfe3a715372 Chengguang Xu         2017-11-29  279  	 */
e8d4bfe3a715372 Chengguang Xu         2017-11-29  280  	if (!wait)
e593b2bf513dd4d Amir Goldstein        2017-01-23  281  		return 0;
e593b2bf513dd4d Amir Goldstein        2017-01-23  282  
08f4c7c86d4cf12 Miklos Szeredi        2020-06-04  283  	upper_sb = ovl_upper_mnt(ofs)->mnt_sb;
e8d4bfe3a715372 Chengguang Xu         2017-11-29  284  
12d938a37e0a31d Chengguang Xu         2020-10-10  285  	if (upper_sb->s_op->sync_fs) {
e593b2bf513dd4d Amir Goldstein        2017-01-23  286  		down_read(&upper_sb->s_umount);
12d938a37e0a31d Chengguang Xu         2020-10-10  287  		ret = upper_sb->s_op->sync_fs(upper_sb, wait);
12d938a37e0a31d Chengguang Xu         2020-10-10  288  		if (!ret)
12d938a37e0a31d Chengguang Xu         2020-10-10  289  			ret = sync_blockdev(upper_sb->s_bdev);
e593b2bf513dd4d Amir Goldstein        2017-01-23  290  		up_read(&upper_sb->s_umount);
12d938a37e0a31d Chengguang Xu         2020-10-10  291  	}

"ret" not initialized on else path.

e8d4bfe3a715372 Chengguang Xu         2017-11-29  292  
e593b2bf513dd4d Amir Goldstein        2017-01-23 @293  	return ret;
e593b2bf513dd4d Amir Goldstein        2017-01-23  294  }

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33739 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC PATCH 5/5] ovl: impement containerized syncfs for overlayfs
Date: Mon, 12 Oct 2020 15:31:47 +0300	[thread overview]
Message-ID: <20201012123147.GS1042@kadam> (raw)
In-Reply-To: <20201010142355.741645-6-cgxu519@mykernel.net>

[-- Attachment #1: Type: text/plain, Size: 3506 bytes --]

Hi Chengguang,

url:    https://github.com/0day-ci/linux/commits/Chengguang-Xu/implement-containerized-syncfs-for-overlayfs/20201011-071405
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git overlayfs-next
config: i386-randconfig-m021-20201011 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
fs/overlayfs/super.c:293 ovl_sync_fs() error: uninitialized symbol 'ret'.

vim +/ret +293 fs/overlayfs/super.c

e593b2bf513dd4d Amir Goldstein        2017-01-23  261  static int ovl_sync_fs(struct super_block *sb, int wait)
e593b2bf513dd4d Amir Goldstein        2017-01-23  262  {
ad204488d3046b3 Miklos Szeredi        2017-11-10  263  	struct ovl_fs *ofs = sb->s_fs_info;
e593b2bf513dd4d Amir Goldstein        2017-01-23  264  	struct super_block *upper_sb;
e593b2bf513dd4d Amir Goldstein        2017-01-23  265  	int ret;
e593b2bf513dd4d Amir Goldstein        2017-01-23  266  
08f4c7c86d4cf12 Miklos Szeredi        2020-06-04  267  	if (!ovl_upper_mnt(ofs))
e593b2bf513dd4d Amir Goldstein        2017-01-23  268  		return 0;
e8d4bfe3a715372 Chengguang Xu         2017-11-29  269  
c86243b090bc25f Vivek Goyal           2020-08-31  270  	if (!ovl_should_sync(ofs))
c86243b090bc25f Vivek Goyal           2020-08-31  271  		return 0;
e8d4bfe3a715372 Chengguang Xu         2017-11-29  272  	/*
32b1924b210a70d Konstantin Khlebnikov 2020-04-09  273  	 * Not called for sync(2) call or an emergency sync (SB_I_SKIP_SYNC).
32b1924b210a70d Konstantin Khlebnikov 2020-04-09  274  	 * All the super blocks will be iterated, including upper_sb.
e8d4bfe3a715372 Chengguang Xu         2017-11-29  275  	 *
e8d4bfe3a715372 Chengguang Xu         2017-11-29  276  	 * If this is a syncfs(2) call, then we do need to call
e8d4bfe3a715372 Chengguang Xu         2017-11-29  277  	 * sync_filesystem() on upper_sb, but enough if we do it when being
e8d4bfe3a715372 Chengguang Xu         2017-11-29  278  	 * called with wait == 1.
e8d4bfe3a715372 Chengguang Xu         2017-11-29  279  	 */
e8d4bfe3a715372 Chengguang Xu         2017-11-29  280  	if (!wait)
e593b2bf513dd4d Amir Goldstein        2017-01-23  281  		return 0;
e593b2bf513dd4d Amir Goldstein        2017-01-23  282  
08f4c7c86d4cf12 Miklos Szeredi        2020-06-04  283  	upper_sb = ovl_upper_mnt(ofs)->mnt_sb;
e8d4bfe3a715372 Chengguang Xu         2017-11-29  284  
12d938a37e0a31d Chengguang Xu         2020-10-10  285  	if (upper_sb->s_op->sync_fs) {
e593b2bf513dd4d Amir Goldstein        2017-01-23  286  		down_read(&upper_sb->s_umount);
12d938a37e0a31d Chengguang Xu         2020-10-10  287  		ret = upper_sb->s_op->sync_fs(upper_sb, wait);
12d938a37e0a31d Chengguang Xu         2020-10-10  288  		if (!ret)
12d938a37e0a31d Chengguang Xu         2020-10-10  289  			ret = sync_blockdev(upper_sb->s_bdev);
e593b2bf513dd4d Amir Goldstein        2017-01-23  290  		up_read(&upper_sb->s_umount);
12d938a37e0a31d Chengguang Xu         2020-10-10  291  	}

"ret" not initialized on else path.

e8d4bfe3a715372 Chengguang Xu         2017-11-29  292  
e593b2bf513dd4d Amir Goldstein        2017-01-23 @293  	return ret;
e593b2bf513dd4d Amir Goldstein        2017-01-23  294  }

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33739 bytes --]

  parent reply	other threads:[~2020-10-12 12:31 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-10 14:23 [RFC PATCH 0/5] implement containerized syncfs for overlayfs Chengguang Xu
2020-10-10 14:23 ` [RFC PATCH 1/5] fs: introduce notifier list for vfs inode Chengguang Xu
2020-10-14 16:15   ` Jan Kara
2020-10-15  3:03     ` Chengguang Xu
2020-10-15  6:11       ` Amir Goldstein
2020-10-15 11:29         ` Chengguang Xu
2020-10-15 12:32           ` Amir Goldstein
2020-10-15 13:13             ` Chengguang Xu
2020-10-15 16:02               ` Amir Goldstein
2020-10-15 16:06                 ` Amir Goldstein
2020-10-16  1:56                 ` Chengguang Xu
2020-10-16  4:39                   ` Amir Goldstein
2020-10-16  7:43                     ` Chengguang Xu
2020-10-15  3:25   ` Al Viro
2020-10-15  3:42     ` Chengguang Xu
2020-10-15  4:57       ` Al Viro
2020-10-15 10:56         ` Chengguang Xu
2020-10-16  7:09         ` Chengguang Xu
2020-10-16  9:22           ` Jan Kara
2020-10-10 14:23 ` [RFC PATCH 2/5] fs: export symbol of writeback_single_inode() Chengguang Xu
2020-10-10 14:23 ` [RFC PATCH 3/5] ovl: setup overlayfs' private bdi Chengguang Xu
2020-10-10 14:23 ` [RFC PATCH 4/5] ovl: monitor marking dirty activity of underlying upper inode Chengguang Xu
2020-10-11  1:16   ` kernel test robot
2020-10-11  1:55   ` kernel test robot
2020-10-10 14:23 ` [RFC PATCH 5/5] ovl: impement containerized syncfs for overlayfs Chengguang Xu
2020-10-11  2:57   ` kernel test robot
2020-10-11  3:10   ` kernel test robot
2020-10-11 13:08   ` kernel test robot
2020-10-12 12:31   ` Dan Carpenter [this message]
2020-10-12 12:31     ` Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2020-10-11  7:30 kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201012123147.GS1042@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=kbuild@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.