FYI, we noticed the following commit (built with gcc-7):
commit: 3d487697d219f01d70ac7fc3b9aab59eb98186f0 ("[PATCH] ext4: Fix ext4_empty_dir() for directories with holes") url: https://github.com/0day-ci/linux/commits/Jan-Kara/ext4-Fix-ext4_empty_dir-fo... base: https://git.kernel.org/cgit/linux/kernel/git/tytso/ext4.git dev
in testcase: ltp with following parameters:
disk: 1HDD fs: ext4 test: fs_readonly-02
test-description: The LTP testsuite contains a collection of tools for testing the Linux kernel and related features. test-url: http://linux-test-project.github.io/
on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 8G
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
+--------------------------------------------------+------------+------------+ | | dfdeeb41fb | 3d487697d2 | +--------------------------------------------------+------------+------------+ | boot_successes | 23 | 2 | | boot_failures | 0 | 14 | | BUG:unable_to_handle_page_fault_for_address | 0 | 14 | | Oops:#[##] | 0 | 14 | | RIP:__ext4_check_dir_entry[ext4] | 0 | 14 | | Kernel_panic-not_syncing:Fatal_exception | 0 | 14 | | WARNING:at_net/sched/sch_generic.c:#dev_watchdog | 0 | 1 | | RIP:dev_watchdog | 0 | 1 | | RIP:native_safe_halt | 0 | 1 | +--------------------------------------------------+------------+------------+
If you fix the issue, kindly add following tag Reported-by: kernel test robot lkp@intel.com
[ 1009.326345] BUG: unable to handle page fault for address: ffff8cf8400293a4 [ 1009.331177] #PF: supervisor read access in kernel mode [ 1009.335278] #PF: error_code(0x0000) - not-present page [ 1009.339133] PGD 133601067 P4D 133601067 PUD 0 [ 1009.343023] Oops: 0000 [#1] SMP PTI [ 1009.346578] CPU: 1 PID: 6517 Comm: rm Not tainted 5.4.0-rc3-00091-g3d487697d219f #1 [ 1009.351176] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 [ 1009.356479] RIP: 0010:__ext4_check_dir_entry+0x9/0x110 [ext4] [ 1009.360632] Code: 85 c0 75 b9 44 89 ea 4c 89 e6 48 89 df e8 9f d0 00 00 eb ba 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 66 66 66 66 90 41 54 55 53 <45> 0f b7 58 04 41 0f b6 58 06 41 8b 28 41 83 fb 0b 7e 51 4c 89 d8 [ 1009.369912] RSP: 0018:ffffb745803a3dc8 EFLAGS: 00010246 [ 1009.373596] RAX: 0000000000001000 RBX: ffff8cf78d981a38 RCX: 0000000000000000 [ 1009.377676] RDX: ffff8cf78d981a38 RSI: 0000000000000b43 RDI: ffffffffc0504bc0 [ 1009.381819] RBP: ffff8cf78db82680 R08: ffff8cf8400293a0 R09: ffff8cf78db82680 [ 1009.386099] R10: 000000000000000c R11: 0000000000000fe8 R12: 0000000000000ff4 [ 1009.390307] R13: ffff8cf755977800 R14: ffffffffc0504bc0 R15: ffff8cf8400293a0 [ 1009.394447] FS: 00007fab7790c480(0000) GS:ffff8cf83fd00000(0000) knlGS:0000000000000000 [ 1009.399046] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1009.402896] CR2: ffff8cf8400293a4 CR3: 0000000132e88000 CR4: 00000000000006e0 [ 1009.406953] Call Trace: [ 1009.409781] ext4_empty_dir+0x27b/0x300 [ext4] [ 1009.413102] ext4_rmdir+0xd8/0x310 [ext4] [ 1009.416280] vfs_rmdir+0x7c/0x180 [ 1009.419834] do_rmdir+0x1ee/0x220 [ 1009.423076] do_syscall_64+0x5b/0x1d0 [ 1009.426122] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 1009.429561] RIP: 0033:0x7fab7742f117 [ 1009.432732] Code: 73 01 c3 48 8b 0d 81 bd 2b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 07 01 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 51 bd 2b 00 f7 d8 64 89 01 48 [ 1009.441279] RSP: 002b:00007ffea198fc28 EFLAGS: 00000206 ORIG_RAX: 0000000000000107 [ 1009.444991] RAX: ffffffffffffffda RBX: 00005633dbfd5b50 RCX: 00007fab7742f117 [ 1009.448629] RDX: 0000000000000200 RSI: 00005633dbfd5c58 RDI: 000000000000000b [ 1009.452185] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 [ 1009.455795] R10: 0000000000000006 R11: 0000000000000206 R12: 00005633dbfcb740 [ 1009.459352] R13: 00007ffea198fd60 R14: 00005633dbfd5b50 R15: 0000000000000001 [ 1009.463153] Modules linked in: loop ext4 mbcache jbd2 dm_mod sr_mod cdrom sg intel_rapl_msr ppdev intel_rapl_common bochs_drm drm_vram_helper crct10dif_pclmul crc32_pclmul ttm crc32c_intel ghash_clmulni_intel snd_pcm drm_kms_helper snd_timer ata_generic pata_acpi aesni_intel crypto_simd cryptd snd glue_helper syscopyarea sysfillrect soundcore joydev sysimgblt fb_sys_fops ata_piix pcspkr serio_raw libata drm i2c_piix4 floppy parport_pc parport ip_tables [ 1009.480345] CR2: ffff8cf8400293a4 [ 1009.482872] ---[ end trace 8135e2d118130929 ]---
To reproduce:
# build kernel cd linux cp config-5.4.0-rc3-00091-g3d487697d219f .config make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 olddefconfig prepare modules_prepare bzImage modules make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 INSTALL_MOD_PATH=<mod-install-dir> modules_install cd <mod-install-dir> find lib/ | cpio -o -H newc --quiet | gzip > modules.cgz
git clone https://github.com/intel/lkp-tests.git cd lkp-tests bin/lkp qemu -k <bzImage> -m modules.cgz job-script # job-script is attached in this email
Thanks, lkp