From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: fs/overlayfs/util.c:479 ovl_path_open() error: uninitialized symbol 'acc_mode'.
Date: Fri, 23 Apr 2021 04:03:26 +0800 [thread overview]
Message-ID: <202104230422.E4vvdU1G-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3042 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Miklos Szeredi <mszeredi@redhat.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 16fc44d6387e260f4932e9248b985837324705d8
commit: 56230d956739b9cb1cbde439d76227d77979a04d ovl: verify permissions in ovl_path_open()
date: 11 months ago
:::::: branch date: 27 hours ago
:::::: commit date: 11 months ago
config: ia64-randconfig-m031-20210422 (attached as .config)
compiler: ia64-linux-gcc (GCC) 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/util.c:479 ovl_path_open() error: uninitialized symbol 'acc_mode'.
vim +/acc_mode +479 fs/overlayfs/util.c
bbb1e54dd53cf8 Miklos Szeredi 2016-12-16 459
bbb1e54dd53cf8 Miklos Szeredi 2016-12-16 460 struct file *ovl_path_open(struct path *path, int flags)
bbb1e54dd53cf8 Miklos Szeredi 2016-12-16 461 {
56230d956739b9 Miklos Szeredi 2020-06-02 462 struct inode *inode = d_inode(path->dentry);
56230d956739b9 Miklos Szeredi 2020-06-02 463 int err, acc_mode;
56230d956739b9 Miklos Szeredi 2020-06-02 464
56230d956739b9 Miklos Szeredi 2020-06-02 465 if (flags & ~(O_ACCMODE | O_LARGEFILE))
56230d956739b9 Miklos Szeredi 2020-06-02 466 BUG();
56230d956739b9 Miklos Szeredi 2020-06-02 467
56230d956739b9 Miklos Szeredi 2020-06-02 468 switch (flags & O_ACCMODE) {
56230d956739b9 Miklos Szeredi 2020-06-02 469 case O_RDONLY:
56230d956739b9 Miklos Szeredi 2020-06-02 470 acc_mode = MAY_READ;
56230d956739b9 Miklos Szeredi 2020-06-02 471 break;
56230d956739b9 Miklos Szeredi 2020-06-02 472 case O_WRONLY:
56230d956739b9 Miklos Szeredi 2020-06-02 473 acc_mode = MAY_WRITE;
56230d956739b9 Miklos Szeredi 2020-06-02 474 break;
56230d956739b9 Miklos Szeredi 2020-06-02 475 default:
56230d956739b9 Miklos Szeredi 2020-06-02 476 BUG();
56230d956739b9 Miklos Szeredi 2020-06-02 477 }
56230d956739b9 Miklos Szeredi 2020-06-02 478
56230d956739b9 Miklos Szeredi 2020-06-02 @479 err = inode_permission(inode, acc_mode | MAY_OPEN);
56230d956739b9 Miklos Szeredi 2020-06-02 480 if (err)
56230d956739b9 Miklos Szeredi 2020-06-02 481 return ERR_PTR(err);
56230d956739b9 Miklos Szeredi 2020-06-02 482
56230d956739b9 Miklos Szeredi 2020-06-02 483 /* O_NOATIME is an optimization, don't fail if not permitted */
56230d956739b9 Miklos Szeredi 2020-06-02 484 if (inode_owner_or_capable(inode))
56230d956739b9 Miklos Szeredi 2020-06-02 485 flags |= O_NOATIME;
56230d956739b9 Miklos Szeredi 2020-06-02 486
56230d956739b9 Miklos Szeredi 2020-06-02 487 return dentry_open(path, flags, current_cred());
bbb1e54dd53cf8 Miklos Szeredi 2016-12-16 488 }
39d3d60a54df05 Amir Goldstein 2017-01-17 489
---
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: 26010 bytes --]
next reply other threads:[~2021-04-22 20:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-22 20:03 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-10-04 2:59 fs/overlayfs/util.c:479 ovl_path_open() error: uninitialized symbol 'acc_mode' 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=202104230422.E4vvdU1G-lkp@intel.com \
--to=lkp@intel.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.