tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git 
dev-test
head:   869734b9a4ef9440e80dba629c688ed3277a7779
commit: 33c0363d5e5bbd712480e048a1ff67a3bca84ba1 [187/191] f2fs: introduce 
fs_context_operation structure
config: x86_64-randconfig-161-20250515 
(https://download.01.org/0day-ci/archive/20250516/202505161519.ew2oo7cw-...@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 
58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)

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 <l...@intel.com>
| Reported-by: Dan Carpenter <dan.carpen...@linaro.org>
| Closes: https://lore.kernel.org/r/202505161519.ew2oo7cw-...@intel.com/

smatch warnings:
fs/f2fs/super.c:858 f2fs_parse_param() warn: impossible condition 
'(result.int_32 > ((~0 >> 1))) => (s32min-s32max > s32max)'

vim +858 fs/f2fs/super.c

7c2e59632b846a Jaegeuk Kim      2018-01-04   848        case Opt_resgid:
419819cc34ee43 Hongbo Li        2025-04-23   849                
F2FS_CTX_INFO(ctx).s_resgid = result.gid;
419819cc34ee43 Hongbo Li        2025-04-23   850                ctx->spec_mask 
|= F2FS_SPEC_resgid;
7c2e59632b846a Jaegeuk Kim      2018-01-04   851                break;
36abef4e796d38 Jaegeuk Kim      2016-06-03   852        case Opt_mode:
419819cc34ee43 Hongbo Li        2025-04-23   853                
F2FS_CTX_INFO(ctx).fs_mode = result.uint_32;
419819cc34ee43 Hongbo Li        2025-04-23   854                ctx->spec_mask 
|= F2FS_SPEC_mode;
36abef4e796d38 Jaegeuk Kim      2016-06-03   855                break;
4cb037ec3f754f Chengguang Xu    2018-09-12   856  #ifdef 
CONFIG_F2FS_FAULT_INJECTION
73faec4d99358b Jaegeuk Kim      2016-04-29   857        case 
Opt_fault_injection:
5cefc0eae8b492 Hongbo Li        2025-04-23  @858                if 
(result.int_32 > INT_MAX)

What is the point of this check?  Obviously an int can't be more than
INT_MAX?  Was something else intended?

4ed886b187f474 Chao Yu          2024-05-07   859                        return 
-EINVAL;
419819cc34ee43 Hongbo Li        2025-04-23   860                
F2FS_CTX_INFO(ctx).fault_info.inject_rate = result.int_32;
419819cc34ee43 Hongbo Li        2025-04-23   861                ctx->spec_mask 
|= F2FS_SPEC_fault_injection;
419819cc34ee43 Hongbo Li        2025-04-23   862                
ctx_set_opt(ctx, F2FS_MOUNT_FAULT_INJECTION);
d494500a704342 Chao Yu          2018-08-08   863                break;
4cb037ec3f754f Chengguang Xu    2018-09-12   864  
d494500a704342 Chao Yu          2018-08-08   865        case Opt_fault_type:
5cefc0eae8b492 Hongbo Li        2025-04-23   866                if 
(result.uint_32 > BIT(FAULT_MAX))
4ed886b187f474 Chao Yu          2024-05-07   867                        return 
-EINVAL;

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to