lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 29 Aug 2019 12:03:59 +0800
From:   kernel test robot <rong.a.chen@...el.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Joseph Qi <joseph.qi@...ux.alibaba.com>,
        Mark Fasheh <mark@...heh.com>,
        Joel Becker <jlbec@...lplan.org>,
        Jia Guo <guojia12@...wei.com>,
        Junxiao Bi <junxiao.bi@...cle.com>,
        Changwei Ge <gechangwei@...e.cn>, Gang He <ghe@...e.com>,
        Jun Piao <piaojun@...wei.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        LKML <linux-kernel@...r.kernel.org>, lkp@...org
Subject: [ocfs] e581595ea2: general_protection_fault:#[##]

FYI, we noticed the following commit (built with gcc-7):

commit: e581595ea29c737587bcc349420bfdacb9a6b02b ("ocfs: no need to check return value of debugfs_create functions")
https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux.git master

in testcase: ocfs2test
with following parameters:

	disk: 1SSD
	test: test-mkfs



on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 4G

caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):


+-----------------------------------------------------------------------------+------------+------------+
|                                                                             | 5da844a2c7 | e581595ea2 |
+-----------------------------------------------------------------------------+------------+------------+
| boot_successes                                                              | 0          | 0          |
| boot_failures                                                               | 120        | 120        |
| BUG:sleeping_function_called_from_invalid_context_at_kernel/locking/rwsem.c | 120        | 120        |
| general_protection_fault:#[##]                                              | 0          | 2          |
| RIP:kmem_cache_alloc_node_trace                                             | 0          | 2          |
| Kernel_panic-not_syncing:Fatal_exception                                    | 0          | 7          |
| BUG:unable_to_handle_page_fault_for_address                                 | 0          | 2          |
| Oops:#[##]                                                                  | 0          | 3          |
| RIP:kmem_cache_alloc_trace                                                  | 0          | 2          |
| stack_segment:#[##]                                                         | 0          | 2          |
| RIP:__kmalloc                                                               | 0          | 3          |
| BUG:kernel_NULL_pointer_dereference,address                                 | 0          | 1          |
| kernel_BUG_at_mm/slub.c                                                     | 0          | 4          |
| invalid_opcode:#[##]                                                        | 0          | 4          |
| RIP:kfree                                                                   | 0          | 4          |
| RIP:native_safe_halt                                                        | 0          | 3          |
| Kernel_panic-not_syncing:Fatal_exception_in_interrupt                       | 0          | 3          |
+-----------------------------------------------------------------------------+------------+------------+


If you fix the issue, kindly add following tag
Reported-by: kernel test robot <rong.a.chen@...el.com>


[  130.818695] BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:1483
[  130.827632] in_atomic(): 1, irqs_disabled(): 0, pid: 2581, name: mount.ocfs2
[  130.834496] CPU: 0 PID: 2581 Comm: mount.ocfs2 Not tainted 5.2.0-05650-ge581595ea29c7 #1
[  130.842442] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014
[  130.850091] Call Trace:
[  130.853767]  dump_stack+0x5c/0x7b
[  130.857999]  ___might_sleep+0xf1/0x110
[  130.863292]  down_write+0x1c/0x50
[  130.867579]  configfs_depend_item+0x3a/0xb0
[  130.872575]  o2hb_region_pin+0xf9/0x180 [ocfs2_nodemanager]
[  130.878592]  o2hb_register_callback+0xc6/0x2a0 [ocfs2_nodemanager]
[  130.885074]  dlm_join_domain+0xbd/0x7a0 [ocfs2_dlm]
[  130.890726]  ? debugfs_create_dir+0xbf/0xf0
[  130.895845]  ? dlm_alloc_ctxt+0x50a/0x580 [ocfs2_dlm]
[  130.901609]  dlm_register_domain+0x31f/0x410 [ocfs2_dlm]
[  130.907642]  ? enqueue_entity+0x109/0x6c0
[  130.912750]  ? _cond_resched+0x19/0x30
[  130.917689]  o2cb_cluster_connect+0x132/0x2c0 [ocfs2_stack_o2cb]
[  130.924275]  ocfs2_cluster_connect+0x14b/0x220 [ocfs2_stackglue]
[  130.930980]  ocfs2_dlm_init+0x2f1/0x4b0 [ocfs2]
[  130.936548]  ? ocfs2_init_node_maps+0x50/0x50 [ocfs2]
[  130.942523]  ? __debugfs_create_file+0xcd/0x110
[  130.948137]  ocfs2_fill_super+0xcc7/0x1280 [ocfs2]
[  130.954086]  ? ocfs2_initialize_super+0x1030/0x1030 [ocfs2]
[  130.961132]  mount_bdev+0x173/0x1b0
[  130.966093]  legacy_get_tree+0x27/0x40
[  130.971350]  vfs_get_tree+0x25/0xf0
[  130.976399]  do_mount+0x683/0x9b0
[  130.981447]  ksys_mount+0x80/0xd0
[  130.986305]  __x64_sys_mount+0x21/0x30
[  130.991495]  do_syscall_64+0x5b/0x1d0
[  130.996637]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[  131.002994] RIP: 0033:0x7f679b62c48a
[  131.008086] Code: 48 8b 0d 11 fa 2a 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 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d de f9 2a 00 f7 d8 64 89 01 48
[  131.026426] RSP: 002b:00007ffc3d6b86f8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
[  131.034615] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f679b62c48a
[  131.042542] RDX: 000055c01412d3ee RSI: 000055c015cca0b0 RDI: 000055c015cca310
[  131.050304] RBP: 00007ffc3d6b88a0 R08: 000055c015cca2b0 R09: 0000000000000020
[  131.058295] R10: 0000000000000000 R11: 0000000000000202 R12: 00007ffc3d6b8790
[  131.066428] R13: 0000000000000000 R14: 000055c015ccb000 R15: 00007ffc3d6b8710
[  131.227754] o2dlm: Joining domain 38603BB822D84A80BEE2C8D71E30772E 
[  131.227757] ( 
[  131.235148] 1 
[  131.239382] ) 1 nodes
[  131.276056] JBD2: Ignoring recovery information on journal
[  131.297552] ocfs2: Mounting device (8,0) on (node 1, slot 0) with ordered data mode.
[  131.371007] mount /dev/sda /mnt/ocfs2 /dev/sda          16515072      243712    16271360   2% /mnt/ocfs2
[  131.371019] 
[  131.387252] OK
[  131.387264] 
[  131.414018] create testdir /mnt/ocfs2/20190828_092250
[  131.414032] 
[  131.468142] create 15890 files .
[  131.468154] 
[  131.477311] 
[  135.560691] o2dlm: Leaving domain 38603BB822D84A80BEE2C8D71E30772E
[  135.638778] blk_update_request: I/O error, dev fd0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[  135.648549] floppy: error 10 while reading block 0
[  136.937733] ocfs2: Unmounting device (8,0) on (node 1)
[  136.960219] umount /mnt/ocfs2 OK
[  136.960230] 
[  138.032771] fsck ..... OK
[  138.032782] 
[  138.907358] general protection fault: 0000 [#1] SMP PTI
[  138.917052] CPU: 0 PID: 655 Comm: meminfo Tainted: G        W         5.2.0-05650-ge581595ea29c7 #1
[  138.931082] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014
[  138.942342] RIP: 0010:kmem_cache_alloc_node_trace+0x109/0x1f0
[  138.949871] Code: 0e 41 f6 45 0b 04 4d 89 e9 0f 84 61 ff ff ff 4c 89 ef e8 3a d2 01 00 49 89 c1 e9 51 ff ff ff 41 8b 41 20 49 8b 39 48 8d 4a 01 <49> 8b 1c 06 4c 89 f0 65 48 0f c7 0f 0f 94 c0 84 c0 0f 84 38 ff ff
[  138.970059] RSP: 0018:ffffb2e180d0fce0 EFLAGS: 00010246
[  138.977293] RAX: 0000000000000000 RBX: 0000000000000dc0 RCX: 0000000000007c04
[  138.986113] RDX: 0000000000007c03 RSI: 0000000000000dc0 RDI: 00000000000300a0
[  138.995153] RBP: 0000000000000dc0 R08: ffff99293fc300a0 R09: ffff992907c03800
[  139.003851] R10: 0000000000000000 R11: 0000000000000000 R12: 00000000ffffffff
[  139.012689] R13: ffff992907c03800 R14: ff99287ff92100ff R15: ffffffff8fc5b9da
[  139.022735] FS:  00007f9606466700(0000) GS:ffff99293fc00000(0000) knlGS:0000000000000000
[  139.032083] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  139.040006] CR2: 00005573027453e2 CR3: 000000007d63a000 CR4: 00000000000406f0
[  139.048530] Call Trace:
[  139.053807]  __get_vm_area_node+0x7a/0x170
[  139.060208]  __vmalloc_node_range+0x6d/0x260
[  139.066588]  ? _do_fork+0x74/0x3c0
[  139.072185]  copy_process+0x8a2/0x1bd0
[  139.078289]  ? _do_fork+0x74/0x3c0
[  139.084120]  ? __handle_mm_fault+0x7c2/0xbb0
[  139.090557]  _do_fork+0x74/0x3c0
[  139.096170]  ? handle_mm_fault+0xdd/0x210
[  139.103224]  __x64_sys_clone+0x86/0xb0
[  139.109219]  do_syscall_64+0x5b/0x1d0
[  139.114934]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[  139.121787] RIP: 0033:0x7f9605d6438b
[  139.127654] Code: db 45 85 f6 0f 85 95 01 00 00 64 4c 8b 04 25 10 00 00 00 31 d2 4d 8d 90 d0 02 00 00 31 f6 bf 11 00 20 01 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 0f 87 de 00 00 00 85 c0 41 89 c5 0f 85 e5 00 00
[  139.147420] RSP: 002b:00007ffd29c52a80 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
[  139.156486] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f9605d6438b
[  139.165105] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
[  139.174535] RBP: 00007ffd29c52ab0 R08: 00007f9606466700 R09: 0000000000000001
[  139.183144] R10: 00007f96064669d0 R11: 0000000000000246 R12: 0000000000000000
[  139.191871] R13: 0000000000000000 R14: 0000000000000000 R15: 000055730137dce4
[  139.200519] Modules linked in: ocfs2_stack_o2cb ocfs2_dlm ocfs2 ocfs2_nodemanager ocfs2_stackglue jbd2 sr_mod cdrom sd_mod sg ppdev bochs_drm ttm crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel ata_generic pata_acpi drm_kms_helper snd_pcm aesni_intel snd_timer crypto_simd snd ata_piix cryptd soundcore glue_helper syscopyarea sysfillrect libata joydev sysimgblt pcspkr fb_sys_fops serio_raw virtio_scsi drm i2c_piix4 parport_pc floppy parport ip_tables
[  139.244044] ---[ end trace 92e9283ec58c8a7c ]---


To reproduce:

        # build kernel
	cd linux
	cp config-5.2.0-05650-ge581595ea29c7 .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,
Rong Chen


View attachment "config-5.2.0-05650-ge581595ea29c7" of type "text/plain" (198439 bytes)

View attachment "job-script" of type "text/plain" (4940 bytes)

Download attachment "dmesg.xz" of type "application/x-xz" (19688 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ