* [koverstreet-bcachefs:bcachefs-rebalance_v2 518/799] fs/bcachefs/init/chardev.c:249 bch2_ioctl_disk_remove() warn: 'ca' can also be NULL
@ 2026-01-26 14:49 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-01-26 14:49 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Kent Overstreet <kent.overstreet@linux.dev>
tree: https://github.com/koverstreet/bcachefs bcachefs-rebalance_v2
head: d4b3d00447faf8d4d95db47e3902e4ca4db8fbdc
commit: 383cf0dacfb4922419e7d38a3c22766d62fddc05 [518/799] bcachefs: more __free() conversion
:::::: branch date: 3 months ago
:::::: commit date: 3 months ago
config: x86_64-randconfig-r073-20260126 (https://download.01.org/0day-ci/archive/20260126/202601262244.pCRcXu7I-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
smatch version: v0.5.0-8994-gd50c5a4c
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: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202601262244.pCRcXu7I-lkp@intel.com/
smatch warnings:
fs/bcachefs/init/chardev.c:249 bch2_ioctl_disk_remove() warn: 'ca' can also be NULL
vim +/ca +249 fs/bcachefs/init/chardev.c
ebb0fa27bb872b fs/bcachefs/chardev.c Kent Overstreet 2025-08-18 229
1c6fdbd8f2465d fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 230 static long bch2_ioctl_disk_remove(struct bch_fs *c, struct bch_ioctl_disk arg)
1c6fdbd8f2465d fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 231 {
a515d0a50c6e8b fs/bcachefs/chardev.c Tobias Geerinckx-Rice 2021-07-04 232 if (!capable(CAP_SYS_ADMIN))
a515d0a50c6e8b fs/bcachefs/chardev.c Tobias Geerinckx-Rice 2021-07-04 233 return -EPERM;
a515d0a50c6e8b fs/bcachefs/chardev.c Tobias Geerinckx-Rice 2021-07-04 234
1c6fdbd8f2465d fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 235 if ((arg.flags & ~(BCH_FORCE_IF_DATA_LOST|
1c6fdbd8f2465d fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 236 BCH_FORCE_IF_METADATA_LOST|
1c6fdbd8f2465d fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 237 BCH_FORCE_IF_DEGRADED|
1c6fdbd8f2465d fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 238 BCH_BY_INDEX)) ||
1c6fdbd8f2465d fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 239 arg.pad)
1c6fdbd8f2465d fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 240 return -EINVAL;
1c6fdbd8f2465d fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 241
635c5791582a65 fs/bcachefs/chardev.c Kent Overstreet 2025-07-14 242 struct bch_dev *ca = bch2_device_lookup(c, arg.dev, arg.flags);
1c6fdbd8f2465d fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 243 if (IS_ERR(ca))
1c6fdbd8f2465d fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 244 return PTR_ERR(ca);
1c6fdbd8f2465d fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 245
c72d1fe6d35296 fs/bcachefs/chardev.c Kent Overstreet 2025-08-18 246 CLASS(printbuf, err)();
c72d1fe6d35296 fs/bcachefs/chardev.c Kent Overstreet 2025-08-18 247 int ret = bch2_dev_remove(c, ca, arg.flags, &err);
c72d1fe6d35296 fs/bcachefs/chardev.c Kent Overstreet 2025-08-18 248 if (ret)
c72d1fe6d35296 fs/bcachefs/chardev.c Kent Overstreet 2025-08-18 @249 bch_err(ca, "%s", err.buf);
c72d1fe6d35296 fs/bcachefs/chardev.c Kent Overstreet 2025-08-18 250 return ret;
1c6fdbd8f2465d fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 251 }
1c6fdbd8f2465d fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 252
:::::: The code at line 249 was first introduced by commit
:::::: c72d1fe6d3529612bb93391e29c5658acdf0e568 bcachefs: Plumb a printbuf for error strings through ioctls
:::::: TO: Kent Overstreet <kent.overstreet@linux.dev>
:::::: CC: Kent Overstreet <kent.overstreet@linux.dev>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread* [koverstreet-bcachefs:bcachefs-rebalance_v2 518/799] fs/bcachefs/init/chardev.c:249 bch2_ioctl_disk_remove() warn: 'ca' can also be NULL
@ 2026-05-14 11:21 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-05-14 11:21 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Kent Overstreet <kent.overstreet@linux.dev>
tree: https://github.com/koverstreet/bcachefs bcachefs-rebalance_v2
head: d4b3d00447faf8d4d95db47e3902e4ca4db8fbdc
commit: 383cf0dacfb4922419e7d38a3c22766d62fddc05 [518/799] bcachefs: more __free() conversion
:::::: branch date: 6 months ago
:::::: commit date: 7 months ago
config: i386-randconfig-141-20260514 (https://download.01.org/0day-ci/archive/20260514/202605141930.GaeWbclM-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
smatch: v0.5.0-9185-gbcc58b9c
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: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202605141930.GaeWbclM-lkp@intel.com/
New smatch warnings:
fs/bcachefs/init/chardev.c:249 bch2_ioctl_disk_remove() warn: 'ca' can also be NULL
Old smatch warnings:
fs/bcachefs/init/chardev.c:557 bch2_ioctl_query_accounting() warn: potential user controlled sizeof overflow 'arg.accounting_u64s * 8' '0-u32max * 8'
vim +/ca +249 fs/bcachefs/init/chardev.c
ebb0fa27bb872bf fs/bcachefs/chardev.c Kent Overstreet 2025-08-18 229
1c6fdbd8f2465dd fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 230 static long bch2_ioctl_disk_remove(struct bch_fs *c, struct bch_ioctl_disk arg)
1c6fdbd8f2465dd fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 231 {
a515d0a50c6e8bb fs/bcachefs/chardev.c Tobias Geerinckx-Rice 2021-07-04 232 if (!capable(CAP_SYS_ADMIN))
a515d0a50c6e8bb fs/bcachefs/chardev.c Tobias Geerinckx-Rice 2021-07-04 233 return -EPERM;
a515d0a50c6e8bb fs/bcachefs/chardev.c Tobias Geerinckx-Rice 2021-07-04 234
1c6fdbd8f2465dd fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 235 if ((arg.flags & ~(BCH_FORCE_IF_DATA_LOST|
1c6fdbd8f2465dd fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 236 BCH_FORCE_IF_METADATA_LOST|
1c6fdbd8f2465dd fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 237 BCH_FORCE_IF_DEGRADED|
1c6fdbd8f2465dd fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 238 BCH_BY_INDEX)) ||
1c6fdbd8f2465dd fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 239 arg.pad)
1c6fdbd8f2465dd fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 240 return -EINVAL;
1c6fdbd8f2465dd fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 241
635c5791582a65e fs/bcachefs/chardev.c Kent Overstreet 2025-07-14 242 struct bch_dev *ca = bch2_device_lookup(c, arg.dev, arg.flags);
1c6fdbd8f2465dd fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 243 if (IS_ERR(ca))
1c6fdbd8f2465dd fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 244 return PTR_ERR(ca);
1c6fdbd8f2465dd fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 245
c72d1fe6d352961 fs/bcachefs/chardev.c Kent Overstreet 2025-08-18 246 CLASS(printbuf, err)();
c72d1fe6d352961 fs/bcachefs/chardev.c Kent Overstreet 2025-08-18 247 int ret = bch2_dev_remove(c, ca, arg.flags, &err);
c72d1fe6d352961 fs/bcachefs/chardev.c Kent Overstreet 2025-08-18 248 if (ret)
c72d1fe6d352961 fs/bcachefs/chardev.c Kent Overstreet 2025-08-18 @249 bch_err(ca, "%s", err.buf);
c72d1fe6d352961 fs/bcachefs/chardev.c Kent Overstreet 2025-08-18 250 return ret;
1c6fdbd8f2465dd fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 251 }
1c6fdbd8f2465dd fs/bcachefs/chardev.c Kent Overstreet 2017-03-16 252
:::::: The code at line 249 was first introduced by commit
:::::: c72d1fe6d3529612bb93391e29c5658acdf0e568 bcachefs: Plumb a printbuf for error strings through ioctls
:::::: TO: Kent Overstreet <kent.overstreet@linux.dev>
:::::: CC: Kent Overstreet <kent.overstreet@linux.dev>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-14 11:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-26 14:49 [koverstreet-bcachefs:bcachefs-rebalance_v2 518/799] fs/bcachefs/init/chardev.c:249 bch2_ioctl_disk_remove() warn: 'ca' can also be NULL kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2026-05-14 11:21 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.