From: kernel test robot <lkp@intel.com>
To: Christian Brauner <brauner@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Christian Brauner <christianvanbrauner@gmail.com>
Subject: [brauner-github:work.fd.prepare 42/43] fs/xfs/xfs_handle.c:277:3: error: cannot jump from this goto statement to its label
Date: Wed, 19 Nov 2025 04:27:00 +0800 [thread overview]
Message-ID: <202511190447.ZpMsjLKJ-lkp@intel.com> (raw)
tree: https://github.com/brauner/linux.git work.fd.prepare
head: 7eb06f9f7a76175a82d3c6b9d94219d7b64b6bce
commit: 82f312eed222c8b171f70ee2ee055071ba43a665 [42/43] fs: xfs
config: arm-randconfig-002-20251119 (https://download.01.org/0day-ci/archive/20251119/202511190447.ZpMsjLKJ-lkp@intel.com/config)
compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251119/202511190447.ZpMsjLKJ-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511190447.ZpMsjLKJ-lkp@intel.com/
All errors (new ones prefixed by >>):
>> fs/xfs/xfs_handle.c:277:3: error: cannot jump from this goto statement to its label
goto out_dput;
^
fs/xfs/xfs_handle.c:283:13: note: jump bypasses initialization of variable with __attribute__((cleanup))
FD_PREPARE(fdprep, 0, dentry_open(&path, hreq->oflags, cred));
^
fs/xfs/xfs_handle.c:271:3: error: cannot jump from this goto statement to its label
goto out_dput;
^
fs/xfs/xfs_handle.c:283:13: note: jump bypasses initialization of variable with __attribute__((cleanup))
FD_PREPARE(fdprep, 0, dentry_open(&path, hreq->oflags, cred));
^
fs/xfs/xfs_handle.c:266:3: error: cannot jump from this goto statement to its label
goto out_dput;
^
fs/xfs/xfs_handle.c:283:13: note: jump bypasses initialization of variable with __attribute__((cleanup))
FD_PREPARE(fdprep, 0, dentry_open(&path, hreq->oflags, cred));
^
fs/xfs/xfs_handle.c:254:3: error: cannot jump from this goto statement to its label
goto out_dput;
^
fs/xfs/xfs_handle.c:283:13: note: jump bypasses initialization of variable with __attribute__((cleanup))
FD_PREPARE(fdprep, 0, dentry_open(&path, hreq->oflags, cred));
^
4 errors generated.
vim +277 fs/xfs/xfs_handle.c
af69d852dfe62b Darrick J. Wong 2024-04-22 260
af69d852dfe62b Darrick J. Wong 2024-04-22 261 permflag = hreq->oflags;
af69d852dfe62b Darrick J. Wong 2024-04-22 262 fmode = OPEN_FMODE(permflag);
af69d852dfe62b Darrick J. Wong 2024-04-22 263 if ((!(permflag & O_APPEND) || (permflag & O_TRUNC)) &&
af69d852dfe62b Darrick J. Wong 2024-04-22 264 (fmode & FMODE_WRITE) && IS_APPEND(inode)) {
af69d852dfe62b Darrick J. Wong 2024-04-22 265 error = -EPERM;
af69d852dfe62b Darrick J. Wong 2024-04-22 266 goto out_dput;
af69d852dfe62b Darrick J. Wong 2024-04-22 267 }
af69d852dfe62b Darrick J. Wong 2024-04-22 268
af69d852dfe62b Darrick J. Wong 2024-04-22 269 if ((fmode & FMODE_WRITE) && IS_IMMUTABLE(inode)) {
af69d852dfe62b Darrick J. Wong 2024-04-22 270 error = -EPERM;
af69d852dfe62b Darrick J. Wong 2024-04-22 271 goto out_dput;
af69d852dfe62b Darrick J. Wong 2024-04-22 272 }
af69d852dfe62b Darrick J. Wong 2024-04-22 273
af69d852dfe62b Darrick J. Wong 2024-04-22 274 /* Can't write directories. */
af69d852dfe62b Darrick J. Wong 2024-04-22 275 if (S_ISDIR(inode->i_mode) && (fmode & FMODE_WRITE)) {
af69d852dfe62b Darrick J. Wong 2024-04-22 276 error = -EISDIR;
af69d852dfe62b Darrick J. Wong 2024-04-22 @277 goto out_dput;
af69d852dfe62b Darrick J. Wong 2024-04-22 278 }
af69d852dfe62b Darrick J. Wong 2024-04-22 279
af69d852dfe62b Darrick J. Wong 2024-04-22 280 path.mnt = parfilp->f_path.mnt;
af69d852dfe62b Darrick J. Wong 2024-04-22 281 path.dentry = dentry;
82f312eed222c8 Christian Brauner 2025-11-18 282
82f312eed222c8 Christian Brauner 2025-11-18 283 FD_PREPARE(fdprep, 0, dentry_open(&path, hreq->oflags, cred));
af69d852dfe62b Darrick J. Wong 2024-04-22 284 dput(dentry);
82f312eed222c8 Christian Brauner 2025-11-18 285 if (fd_prepare_failed(fdprep))
82f312eed222c8 Christian Brauner 2025-11-18 286 return fd_prepare_error(fdprep);
af69d852dfe62b Darrick J. Wong 2024-04-22 287
af69d852dfe62b Darrick J. Wong 2024-04-22 288 if (S_ISREG(inode->i_mode)) {
82f312eed222c8 Christian Brauner 2025-11-18 289 struct file *filp = fd_prepare_file(fdprep);
82f312eed222c8 Christian Brauner 2025-11-18 290
af69d852dfe62b Darrick J. Wong 2024-04-22 291 filp->f_flags |= O_NOATIME;
af69d852dfe62b Darrick J. Wong 2024-04-22 292 filp->f_mode |= FMODE_NOCMTIME;
af69d852dfe62b Darrick J. Wong 2024-04-22 293 }
af69d852dfe62b Darrick J. Wong 2024-04-22 294
82f312eed222c8 Christian Brauner 2025-11-18 295 return fd_publish(fdprep);
af69d852dfe62b Darrick J. Wong 2024-04-22 296
af69d852dfe62b Darrick J. Wong 2024-04-22 297 out_dput:
af69d852dfe62b Darrick J. Wong 2024-04-22 298 dput(dentry);
af69d852dfe62b Darrick J. Wong 2024-04-22 299 return error;
af69d852dfe62b Darrick J. Wong 2024-04-22 300 }
af69d852dfe62b Darrick J. Wong 2024-04-22 301
:::::: The code at line 277 was first introduced by commit
:::::: af69d852dfe62b925d0df401eafad40698c889c6 xfs: move handle ioctl code to xfs_handle.c
:::::: TO: Darrick J. Wong <djwong@kernel.org>
:::::: CC: Darrick J. Wong <djwong@kernel.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-11-18 20:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202511190447.ZpMsjLKJ-lkp@intel.com \
--to=lkp@intel.com \
--cc=brauner@kernel.org \
--cc=christianvanbrauner@gmail.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).