From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org
Subject: Re: [RFC PATCH 2/2] overlayfs: propagate errors from upper to overlay sb in sync_fs
Date: Mon, 14 Dec 2020 12:14:01 +0300 [thread overview]
Message-ID: <20201214091401.GA2831@kadam> (raw)
In-Reply-To: <20201213132713.66864-3-jlayton@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 3985 bytes --]
Hi Jeff,
url: https://github.com/0day-ci/linux/commits/Jeff-Layton/errseq-overlayfs-accomodate-the-volatile-upper-layer-use-case/20201213-213109
base: https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git overlayfs-next
config: i386-randconfig-m021-20201213 (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:272 ovl_sync_fs() error: uninitialized symbol 'upper_sb'.
vim +/upper_sb +272 fs/overlayfs/super.c
e8d4bfe3a715372 Chengguang Xu 2017-11-29 260 /* Sync real dirty inodes in upper filesystem (if it exists) */
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
89bd90a6b2a9bc4 Jeff Layton 2020-12-13 270 if (!ovl_should_sync(ofs)) {
89bd90a6b2a9bc4 Jeff Layton 2020-12-13 271 /* Propagate errors from upper to overlayfs */
89bd90a6b2a9bc4 Jeff Layton 2020-12-13 @272 ret = errseq_check(&upper_sb->s_wb_err, ofs->err_mark);
^^^^^^^^^^^^^^^^^^^
Uninitialized.
89bd90a6b2a9bc4 Jeff Layton 2020-12-13 273 errseq_set(&sb->s_wb_err, ret);
89bd90a6b2a9bc4 Jeff Layton 2020-12-13 274 return ret;
89bd90a6b2a9bc4 Jeff Layton 2020-12-13 275 }
89bd90a6b2a9bc4 Jeff Layton 2020-12-13 276
e8d4bfe3a715372 Chengguang Xu 2017-11-29 277 /*
32b1924b210a70d Konstantin Khlebnikov 2020-04-09 278 * Not called for sync(2) call or an emergency sync (SB_I_SKIP_SYNC).
32b1924b210a70d Konstantin Khlebnikov 2020-04-09 279 * All the super blocks will be iterated, including upper_sb.
e8d4bfe3a715372 Chengguang Xu 2017-11-29 280 *
e8d4bfe3a715372 Chengguang Xu 2017-11-29 281 * If this is a syncfs(2) call, then we do need to call
e8d4bfe3a715372 Chengguang Xu 2017-11-29 282 * sync_filesystem() on upper_sb, but enough if we do it when being
e8d4bfe3a715372 Chengguang Xu 2017-11-29 283 * called with wait == 1.
e8d4bfe3a715372 Chengguang Xu 2017-11-29 284 */
e8d4bfe3a715372 Chengguang Xu 2017-11-29 285 if (!wait)
e593b2bf513dd4d Amir Goldstein 2017-01-23 286 return 0;
e593b2bf513dd4d Amir Goldstein 2017-01-23 287
08f4c7c86d4cf12 Miklos Szeredi 2020-06-04 288 upper_sb = ovl_upper_mnt(ofs)->mnt_sb;
e8d4bfe3a715372 Chengguang Xu 2017-11-29 289
e593b2bf513dd4d Amir Goldstein 2017-01-23 290 down_read(&upper_sb->s_umount);
e8d4bfe3a715372 Chengguang Xu 2017-11-29 291 ret = sync_filesystem(upper_sb);
e593b2bf513dd4d Amir Goldstein 2017-01-23 292 up_read(&upper_sb->s_umount);
e8d4bfe3a715372 Chengguang Xu 2017-11-29 293
e593b2bf513dd4d Amir Goldstein 2017-01-23 294 return ret;
e593b2bf513dd4d Amir Goldstein 2017-01-23 295 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34596 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: [kbuild] Re: [RFC PATCH 2/2] overlayfs: propagate errors from upper to overlay sb in sync_fs
Date: Mon, 14 Dec 2020 12:14:01 +0300 [thread overview]
Message-ID: <20201214091401.GA2831@kadam> (raw)
In-Reply-To: <20201213132713.66864-3-jlayton@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 3985 bytes --]
Hi Jeff,
url: https://github.com/0day-ci/linux/commits/Jeff-Layton/errseq-overlayfs-accomodate-the-volatile-upper-layer-use-case/20201213-213109
base: https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git overlayfs-next
config: i386-randconfig-m021-20201213 (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:272 ovl_sync_fs() error: uninitialized symbol 'upper_sb'.
vim +/upper_sb +272 fs/overlayfs/super.c
e8d4bfe3a715372 Chengguang Xu 2017-11-29 260 /* Sync real dirty inodes in upper filesystem (if it exists) */
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
89bd90a6b2a9bc4 Jeff Layton 2020-12-13 270 if (!ovl_should_sync(ofs)) {
89bd90a6b2a9bc4 Jeff Layton 2020-12-13 271 /* Propagate errors from upper to overlayfs */
89bd90a6b2a9bc4 Jeff Layton 2020-12-13 @272 ret = errseq_check(&upper_sb->s_wb_err, ofs->err_mark);
^^^^^^^^^^^^^^^^^^^
Uninitialized.
89bd90a6b2a9bc4 Jeff Layton 2020-12-13 273 errseq_set(&sb->s_wb_err, ret);
89bd90a6b2a9bc4 Jeff Layton 2020-12-13 274 return ret;
89bd90a6b2a9bc4 Jeff Layton 2020-12-13 275 }
89bd90a6b2a9bc4 Jeff Layton 2020-12-13 276
e8d4bfe3a715372 Chengguang Xu 2017-11-29 277 /*
32b1924b210a70d Konstantin Khlebnikov 2020-04-09 278 * Not called for sync(2) call or an emergency sync (SB_I_SKIP_SYNC).
32b1924b210a70d Konstantin Khlebnikov 2020-04-09 279 * All the super blocks will be iterated, including upper_sb.
e8d4bfe3a715372 Chengguang Xu 2017-11-29 280 *
e8d4bfe3a715372 Chengguang Xu 2017-11-29 281 * If this is a syncfs(2) call, then we do need to call
e8d4bfe3a715372 Chengguang Xu 2017-11-29 282 * sync_filesystem() on upper_sb, but enough if we do it when being
e8d4bfe3a715372 Chengguang Xu 2017-11-29 283 * called with wait == 1.
e8d4bfe3a715372 Chengguang Xu 2017-11-29 284 */
e8d4bfe3a715372 Chengguang Xu 2017-11-29 285 if (!wait)
e593b2bf513dd4d Amir Goldstein 2017-01-23 286 return 0;
e593b2bf513dd4d Amir Goldstein 2017-01-23 287
08f4c7c86d4cf12 Miklos Szeredi 2020-06-04 288 upper_sb = ovl_upper_mnt(ofs)->mnt_sb;
e8d4bfe3a715372 Chengguang Xu 2017-11-29 289
e593b2bf513dd4d Amir Goldstein 2017-01-23 290 down_read(&upper_sb->s_umount);
e8d4bfe3a715372 Chengguang Xu 2017-11-29 291 ret = sync_filesystem(upper_sb);
e593b2bf513dd4d Amir Goldstein 2017-01-23 292 up_read(&upper_sb->s_umount);
e8d4bfe3a715372 Chengguang Xu 2017-11-29 293
e593b2bf513dd4d Amir Goldstein 2017-01-23 294 return ret;
e593b2bf513dd4d Amir Goldstein 2017-01-23 295 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34596 bytes --]
next prev parent reply other threads:[~2020-12-14 9:14 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-13 13:27 [RFC PATCH 0/2] errseq+overlayfs: accomodate the volatile upper layer use-case Jeff Layton
2020-12-13 13:27 ` [RFC PATCH 1/2] errseq: split the SEEN flag into two new flags Jeff Layton
2020-12-13 23:35 ` NeilBrown
2020-12-14 13:37 ` Jeffrey Layton
2020-12-14 22:00 ` NeilBrown
2020-12-14 23:32 ` Jeff Layton
2020-12-13 13:27 ` [RFC PATCH 2/2] overlayfs: propagate errors from upper to overlay sb in sync_fs Jeff Layton
2020-12-13 17:02 ` kernel test robot
2020-12-14 9:14 ` Dan Carpenter [this message]
2020-12-14 9:14 ` [kbuild] " Dan Carpenter
2020-12-14 21:38 ` Vivek Goyal
2020-12-14 22:04 ` Sargun Dhillon
2020-12-14 23:01 ` Vivek Goyal
2020-12-14 23:53 ` Jeff Layton
2020-12-15 13:16 ` Jeff Layton
2020-12-15 14:59 ` Vivek Goyal
2020-12-15 15:23 ` Jeff Layton
2020-12-15 15:39 ` Vivek Goyal
2020-12-15 15:06 ` Vivek Goyal
2020-12-17 19:28 ` Sargun Dhillon
2020-12-13 20:31 ` [RFC PATCH 0/2] errseq+overlayfs: accomodate the volatile upper layer use-case Sargun Dhillon
-- strict thread matches above, loose matches on Subject: below --
2020-12-13 16:38 [RFC PATCH 2/2] overlayfs: propagate errors from upper to overlay sb in sync_fs 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=20201214091401.GA2831@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.