fs/ceph/super.c:1042 ceph_umount_begin() warn: variable dereferenced before check 'fsc' (see line 1041)
kernel test robot
build botBCC: [email protected]
CC: [email protected]
CC: [email protected]
TO: Alex Markuze <[email protected]>
tree: https://github.com/ceph/ceph-client.git tls_logger head: 3d957afa4285ed4deaaf42d200ba7ee1f3092f8d commit: 75b56e556ea415e29a13a8b7e98d302fbbec4c01 [19/40] cephsan new logger
:::::: branch date: 2 days ago
:::::: commit date: 10 days ago
config: x86_64-randconfig-r071-20250328 (https://download.01.org/0day-ci/archive/20250328/[email protected]/config)
compiler: clang version 20.1.1 (https://github.com/llvm/llvm-project 424c2d9b7e4de40d0804dd374721e6411c27d1d1)
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 <[email protected]> | Reported-by: Dan Carpenter <[email protected]> | Closes: https://lore.kernel.org/r/[email protected]/
smatch warnings:fs/ceph/super.c:1042 ceph_umount_begin() warn: variable dereferenced before check 'fsc' (see line 1041)
vim +/fsc +1042 fs/ceph/super.c
50c9132ddfb202 Jeff Layton 2020-09-25 1032
16725b9d2a2e3d Sage Weil 2009-10-06 1033 /*
f1f565a2697661 Randy Dunlap 2020-07-17 1034 * ceph_umount_begin - initiate forced umount. Tear down the
3d14c5d2b6e15c Yehuda Sadeh 2010-04-06 1035 * mount, skipping steps that may hang while waiting for server(s).
16725b9d2a2e3d Sage Weil 2009-10-06 1036 */
631ed4b0828727 Jeff Layton 2021-10-14 1037 void ceph_umount_begin(struct super_block *sb)
16725b9d2a2e3d Sage Weil 2009-10-06 1038 {
5995d90d2d19f3 Xiubo Li 2023-06-12 1039 struct ceph_fs_client *fsc = ceph_sb_to_fs_client(sb);
3d14c5d2b6e15c Yehuda Sadeh 2010-04-06 1040
38d46409c4639a Xiubo Li 2023-06-12 @1041 doutc(fsc->client, "starting forced umount\n");
3d14c5d2b6e15c Yehuda Sadeh 2010-04-06 @1042 if (!fsc)
3d14c5d2b6e15c Yehuda Sadeh 2010-04-06 1043 return;
3d14c5d2b6e15c Yehuda Sadeh 2010-04-06 1044 fsc->mount_state = CEPH_MOUNT_SHUTDOWN;
50c9132ddfb202 Jeff Layton 2020-09-25 1045 __ceph_umount_begin(fsc);
16725b9d2a2e3d Sage Weil 2009-10-06 1046 }16725b9d2a2e3d Sage Weil 2009-10-06 1047
:::::: The code at line 1042 was first introduced by commit
:::::: 3d14c5d2b6e15c21d8e5467dc62d33127c23a644 ceph: factor out libceph from Ceph file system
:::::: TO: Yehuda Sadeh <[email protected]>
:::::: CC: Sage Weil <[email protected]>
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki