* [linux-next:master 7740/12321] fs/xfs/libxfs/xfs_dir2.c:415:1-5: alloc with no test, possible model on line 431
@ 2024-05-09 22:38 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-05-09 22:38 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Julia Lawall
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Christoph Hellwig <hch@lst.de>
CC: Chandan Babu R <chandanbabu@kernel.org>
CC: "Darrick J. Wong" <djwong@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 704ba27ac55579704ba1289392448b0c66b56258
commit: 14ee22fef420c864c0869419e54aa4e88f64b4e6 [7740/12321] xfs: factor out a xfs_dir_lookup_args helper
:::::: branch date: 16 hours ago
:::::: commit date: 2 weeks ago
config: x86_64-randconfig-103-20240509 (https://download.01.org/0day-ci/archive/20240510/202405100601.yF9nftCV-lkp@intel.com/config)
compiler: clang version 18.1.4 (https://github.com/llvm/llvm-project e6c3289804a67ea0bb6a86fadbe454dd93b8d855)
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>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202405100601.yF9nftCV-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> fs/xfs/libxfs/xfs_dir2.c:415:1-5: alloc with no test, possible model on line 431
vim +415 fs/xfs/libxfs/xfs_dir2.c
14ee22fef420c8 fs/xfs/libxfs/xfs_dir2.c Christoph Hellwig 2024-04-25 393
^1da177e4c3f41 fs/xfs/xfs_dir2.c Linus Torvalds 2005-04-16 394 /*
^1da177e4c3f41 fs/xfs/xfs_dir2.c Linus Torvalds 2005-04-16 395 * Lookup a name in a directory, give back the inode number.
384f3ced07efdd fs/xfs/xfs_dir2.c Barry Naujok 2008-05-21 396 * If ci_name is not NULL, returns the actual name in ci_name if it differs
384f3ced07efdd fs/xfs/xfs_dir2.c Barry Naujok 2008-05-21 397 * to name, or ci_name->name is set to NULL for an exact match.
^1da177e4c3f41 fs/xfs/xfs_dir2.c Linus Torvalds 2005-04-16 398 */
384f3ced07efdd fs/xfs/xfs_dir2.c Barry Naujok 2008-05-21 399
f6c2d1fa6310a7 fs/xfs/xfs_dir2.c Nathan Scott 2006-06-20 400 int
f6c2d1fa6310a7 fs/xfs/xfs_dir2.c Nathan Scott 2006-06-20 401 xfs_dir_lookup(
996b2329b20a89 fs/xfs/libxfs/xfs_dir2.c Darrick J. Wong 2022-03-09 402 struct xfs_trans *tp,
996b2329b20a89 fs/xfs/libxfs/xfs_dir2.c Darrick J. Wong 2022-03-09 403 struct xfs_inode *dp,
996b2329b20a89 fs/xfs/libxfs/xfs_dir2.c Darrick J. Wong 2022-03-09 404 const struct xfs_name *name,
384f3ced07efdd fs/xfs/xfs_dir2.c Barry Naujok 2008-05-21 405 xfs_ino_t *inum, /* out: inode number */
384f3ced07efdd fs/xfs/xfs_dir2.c Barry Naujok 2008-05-21 406 struct xfs_name *ci_name) /* out: actual name if CI match */
^1da177e4c3f41 fs/xfs/xfs_dir2.c Linus Torvalds 2005-04-16 407 {
a1358aa3d39251 fs/xfs/xfs_dir2.c Dave Chinner 2014-02-27 408 struct xfs_da_args *args;
f6c2d1fa6310a7 fs/xfs/xfs_dir2.c Nathan Scott 2006-06-20 409 int rval;
dbad7c993053d8 fs/xfs/libxfs/xfs_dir2.c Dave Chinner 2015-08-19 410 int lock_mode;
^1da177e4c3f41 fs/xfs/xfs_dir2.c Linus Torvalds 2005-04-16 411
c19b3b05ae440d fs/xfs/libxfs/xfs_dir2.c Dave Chinner 2016-02-09 412 ASSERT(S_ISDIR(VFS_I(dp)->i_mode));
ff6d6af2351cae fs/xfs/libxfs/xfs_dir2.c Bill O'Donnell 2015-10-12 413 XFS_STATS_INC(dp->i_mount, xs_dir_lookup);
^1da177e4c3f41 fs/xfs/xfs_dir2.c Linus Torvalds 2005-04-16 414
94a69db2367efc fs/xfs/libxfs/xfs_dir2.c Dave Chinner 2024-01-16 @415 args = kzalloc(sizeof(*args),
94a69db2367efc fs/xfs/libxfs/xfs_dir2.c Dave Chinner 2024-01-16 416 GFP_KERNEL | __GFP_NOLOCKDEP | __GFP_NOFAIL);
0650b55497ef58 fs/xfs/xfs_dir2.c Dave Chinner 2014-06-06 417 args->geo = dp->i_mount->m_dir_geo;
a1358aa3d39251 fs/xfs/xfs_dir2.c Dave Chinner 2014-02-27 418 args->name = name->name;
a1358aa3d39251 fs/xfs/xfs_dir2.c Dave Chinner 2014-02-27 419 args->namelen = name->len;
a1358aa3d39251 fs/xfs/xfs_dir2.c Dave Chinner 2014-02-27 420 args->filetype = name->type;
d8d11fc703a22b fs/xfs/libxfs/xfs_dir2.c Christoph Hellwig 2019-11-11 421 args->hashval = xfs_dir2_hashname(dp->i_mount, name);
a1358aa3d39251 fs/xfs/xfs_dir2.c Dave Chinner 2014-02-27 422 args->dp = dp;
a1358aa3d39251 fs/xfs/xfs_dir2.c Dave Chinner 2014-02-27 423 args->whichfork = XFS_DATA_FORK;
a1358aa3d39251 fs/xfs/xfs_dir2.c Dave Chinner 2014-02-27 424 args->trans = tp;
a1358aa3d39251 fs/xfs/xfs_dir2.c Dave Chinner 2014-02-27 425 args->op_flags = XFS_DA_OP_OKNOENT;
9eef772f3a194f fs/xfs/libxfs/xfs_dir2.c Darrick J. Wong 2024-04-15 426 args->owner = dp->i_ino;
384f3ced07efdd fs/xfs/xfs_dir2.c Barry Naujok 2008-05-21 427 if (ci_name)
a1358aa3d39251 fs/xfs/xfs_dir2.c Dave Chinner 2014-02-27 428 args->op_flags |= XFS_DA_OP_CILOOKUP;
f6c2d1fa6310a7 fs/xfs/xfs_dir2.c Nathan Scott 2006-06-20 429
dbad7c993053d8 fs/xfs/libxfs/xfs_dir2.c Dave Chinner 2015-08-19 430 lock_mode = xfs_ilock_data_map_shared(dp);
14ee22fef420c8 fs/xfs/libxfs/xfs_dir2.c Christoph Hellwig 2024-04-25 @431 rval = xfs_dir_lookup_args(args);
384f3ced07efdd fs/xfs/xfs_dir2.c Barry Naujok 2008-05-21 432 if (!rval) {
a1358aa3d39251 fs/xfs/xfs_dir2.c Dave Chinner 2014-02-27 433 *inum = args->inumber;
384f3ced07efdd fs/xfs/xfs_dir2.c Barry Naujok 2008-05-21 434 if (ci_name) {
a1358aa3d39251 fs/xfs/xfs_dir2.c Dave Chinner 2014-02-27 435 ci_name->name = args->value;
a1358aa3d39251 fs/xfs/xfs_dir2.c Dave Chinner 2014-02-27 436 ci_name->len = args->valuelen;
384f3ced07efdd fs/xfs/xfs_dir2.c Barry Naujok 2008-05-21 437 }
384f3ced07efdd fs/xfs/xfs_dir2.c Barry Naujok 2008-05-21 438 }
dbad7c993053d8 fs/xfs/libxfs/xfs_dir2.c Dave Chinner 2015-08-19 439 xfs_iunlock(dp, lock_mode);
d4c75a1b40cd03 fs/xfs/libxfs/xfs_dir2.c Dave Chinner 2024-01-16 440 kfree(args);
^1da177e4c3f41 fs/xfs/xfs_dir2.c Linus Torvalds 2005-04-16 441 return rval;
^1da177e4c3f41 fs/xfs/xfs_dir2.c Linus Torvalds 2005-04-16 442 }
^1da177e4c3f41 fs/xfs/xfs_dir2.c Linus Torvalds 2005-04-16 443
:::::: The code at line 415 was first introduced by commit
:::::: 94a69db2367efcd7e0eeb5d4603340aff1d3c340 xfs: use __GFP_NOLOCKDEP instead of GFP_NOFS
:::::: TO: Dave Chinner <dchinner@redhat.com>
:::::: CC: Chandan Babu R <chandanbabu@kernel.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-05-09 22:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-09 22:38 [linux-next:master 7740/12321] fs/xfs/libxfs/xfs_dir2.c:415:1-5: alloc with no test, possible model on line 431 kernel test robot
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.