* [linux-stable-rc:linux-4.19.y 6515/6544] fs/ext4/ioctl.c:583:21: warning: assignment to 'int' from 'struct super_block *' makes integer from pointer without a cast
@ 2023-07-21 20:31 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-07-21 20:31 UTC (permalink / raw)
To: Chao Yu, Chao Yu; +Cc: oe-kbuild-all, Greg Kroah-Hartman, Theodore Ts'o
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
head: 71e850d72cc54c75316c30f51b1163a0da4f00e1
commit: c1a588a876df1ca461ee0bc432e78ed7f646ca86 [6515/6544] ext4: fix to check return value of freeze_bdev() in ext4_shutdown()
config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20230722/202307220453.tCatLwRG-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230722/202307220453.tCatLwRG-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/202307220453.tCatLwRG-lkp@intel.com/
All warnings (new ones prefixed by >>):
fs/ext4/ioctl.c: In function 'ext4_shutdown':
>> fs/ext4/ioctl.c:583:21: warning: assignment to 'int' from 'struct super_block *' makes integer from pointer without a cast [-Wint-conversion]
583 | ret = freeze_bdev(sb->s_bdev);
| ^
vim +583 fs/ext4/ioctl.c
559
560 static int ext4_shutdown(struct super_block *sb, unsigned long arg)
561 {
562 struct ext4_sb_info *sbi = EXT4_SB(sb);
563 __u32 flags;
564 int ret;
565
566 if (!capable(CAP_SYS_ADMIN))
567 return -EPERM;
568
569 if (get_user(flags, (__u32 __user *)arg))
570 return -EFAULT;
571
572 if (flags > EXT4_GOING_FLAGS_NOLOGFLUSH)
573 return -EINVAL;
574
575 if (ext4_forced_shutdown(sbi))
576 return 0;
577
578 ext4_msg(sb, KERN_ALERT, "shut down requested (%d)", flags);
579 trace_ext4_shutdown(sb, flags);
580
581 switch (flags) {
582 case EXT4_GOING_FLAGS_DEFAULT:
> 583 ret = freeze_bdev(sb->s_bdev);
584 if (ret)
585 return ret;
586 set_bit(EXT4_FLAGS_SHUTDOWN, &sbi->s_ext4_flags);
587 thaw_bdev(sb->s_bdev, sb);
588 break;
589 case EXT4_GOING_FLAGS_LOGFLUSH:
590 set_bit(EXT4_FLAGS_SHUTDOWN, &sbi->s_ext4_flags);
591 if (sbi->s_journal && !is_journal_aborted(sbi->s_journal)) {
592 (void) ext4_force_commit(sb);
593 jbd2_journal_abort(sbi->s_journal, -ESHUTDOWN);
594 }
595 break;
596 case EXT4_GOING_FLAGS_NOLOGFLUSH:
597 set_bit(EXT4_FLAGS_SHUTDOWN, &sbi->s_ext4_flags);
598 if (sbi->s_journal && !is_journal_aborted(sbi->s_journal))
599 jbd2_journal_abort(sbi->s_journal, -ESHUTDOWN);
600 break;
601 default:
602 return -EINVAL;
603 }
604 clear_opt(sb, DISCARD);
605 return 0;
606 }
607
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread* [linux-stable-rc:linux-4.19.y 6515/6544] fs/ext4/ioctl.c:583:21: warning: assignment to 'int' from 'struct super_block *' makes integer from pointer without a cast
@ 2023-07-21 20:31 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-07-21 20:31 UTC (permalink / raw)
To: Chao Yu, Chao Yu; +Cc: oe-kbuild-all, Greg Kroah-Hartman, Theodore Ts'o
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
head: 71e850d72cc54c75316c30f51b1163a0da4f00e1
commit: c1a588a876df1ca461ee0bc432e78ed7f646ca86 [6515/6544] ext4: fix to check return value of freeze_bdev() in ext4_shutdown()
config: um-defconfig (https://download.01.org/0day-ci/archive/20230722/202307220419.LMXn9twJ-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230722/202307220419.LMXn9twJ-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/202307220419.LMXn9twJ-lkp@intel.com/
All warnings (new ones prefixed by >>):
cc1: warning: arch/um/include/uapi: No such file or directory [-Wmissing-include-dirs]
In file included from include/linux/uaccess.h:14,
from include/linux/compat.h:19,
from fs/ext4/ioctl.c:14:
arch/um/include/asm/uaccess.h: In function '__access_ok':
arch/um/include/asm/uaccess.h:17:36: warning: comparison of unsigned expression in '>= 0' is always true [-Wtype-limits]
17 | (((unsigned long) (addr) >= FIXADDR_USER_START) && \
| ^~
arch/um/include/asm/uaccess.h:45:17: note: in expansion of macro '__access_ok_vsyscall'
45 | __access_ok_vsyscall(addr, size) ||
| ^~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kernel.h:10,
from include/linux/list.h:9,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from fs/ext4/ioctl.c:11:
include/asm-generic/fixmap.h: In function 'fix_to_virt':
include/asm-generic/fixmap.h:31:26: warning: comparison of unsigned expression in '>= 0' is always true [-Wtype-limits]
31 | BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
| ^~
include/linux/compiler.h:398:23: note: in definition of macro '__compiletime_assert'
398 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:418:9: note: in expansion of macro '_compiletime_assert'
418 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
45 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:69:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
69 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
include/asm-generic/fixmap.h:31:9: note: in expansion of macro 'BUILD_BUG_ON'
31 | BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
| ^~~~~~~~~~~~
In file included from include/linux/memremap.h:7,
from include/linux/mm.h:27,
from include/linux/pagemap.h:8,
from include/linux/buffer_head.h:14,
from include/linux/jbd2.h:26,
from fs/ext4/ext4_jbd2.h:16,
from fs/ext4/ioctl.c:23:
include/linux/mm.h: In function 'pgtable_init':
arch/um/include/asm/pgtable.h:35:33: warning: suggest braces around empty body in 'do' statement [-Wempty-body]
35 | #define pgtable_cache_init() do ; while (0)
| ^
include/linux/mm.h:1929:9: note: in expansion of macro 'pgtable_cache_init'
1929 | pgtable_cache_init();
| ^~~~~~~~~~~~~~~~~~
fs/ext4/ioctl.c: In function 'ext4_shutdown':
>> fs/ext4/ioctl.c:583:21: warning: assignment to 'int' from 'struct super_block *' makes integer from pointer without a cast [-Wint-conversion]
583 | ret = freeze_bdev(sb->s_bdev);
| ^
vim +583 fs/ext4/ioctl.c
559
560 static int ext4_shutdown(struct super_block *sb, unsigned long arg)
561 {
562 struct ext4_sb_info *sbi = EXT4_SB(sb);
563 __u32 flags;
564 int ret;
565
566 if (!capable(CAP_SYS_ADMIN))
567 return -EPERM;
568
569 if (get_user(flags, (__u32 __user *)arg))
570 return -EFAULT;
571
572 if (flags > EXT4_GOING_FLAGS_NOLOGFLUSH)
573 return -EINVAL;
574
575 if (ext4_forced_shutdown(sbi))
576 return 0;
577
578 ext4_msg(sb, KERN_ALERT, "shut down requested (%d)", flags);
579 trace_ext4_shutdown(sb, flags);
580
581 switch (flags) {
582 case EXT4_GOING_FLAGS_DEFAULT:
> 583 ret = freeze_bdev(sb->s_bdev);
584 if (ret)
585 return ret;
586 set_bit(EXT4_FLAGS_SHUTDOWN, &sbi->s_ext4_flags);
587 thaw_bdev(sb->s_bdev, sb);
588 break;
589 case EXT4_GOING_FLAGS_LOGFLUSH:
590 set_bit(EXT4_FLAGS_SHUTDOWN, &sbi->s_ext4_flags);
591 if (sbi->s_journal && !is_journal_aborted(sbi->s_journal)) {
592 (void) ext4_force_commit(sb);
593 jbd2_journal_abort(sbi->s_journal, -ESHUTDOWN);
594 }
595 break;
596 case EXT4_GOING_FLAGS_NOLOGFLUSH:
597 set_bit(EXT4_FLAGS_SHUTDOWN, &sbi->s_ext4_flags);
598 if (sbi->s_journal && !is_journal_aborted(sbi->s_journal))
599 jbd2_journal_abort(sbi->s_journal, -ESHUTDOWN);
600 break;
601 default:
602 return -EINVAL;
603 }
604 clear_opt(sb, DISCARD);
605 return 0;
606 }
607
--
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:[~2023-07-21 20:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-21 20:31 [linux-stable-rc:linux-4.19.y 6515/6544] fs/ext4/ioctl.c:583:21: warning: assignment to 'int' from 'struct super_block *' makes integer from pointer without a cast kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2023-07-21 20:31 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.