From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162701AbcEaCos (ORCPT ); Mon, 30 May 2016 22:44:48 -0400 Received: from mail-yw0-f195.google.com ([209.85.161.195]:34234 "EHLO mail-yw0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161732AbcEaCoq convert rfc822-to-8bit (ORCPT ); Mon, 30 May 2016 22:44:46 -0400 Date: Mon, 30 May 2016 22:44:39 -0400 From: William Breathitt Gray To: kernel test robot Cc: Greg Kroah-Hartman , Linus Walleij , Alexandre Courbot , LKML , Linus Torvalds , lkp@01.org Subject: Re: [gpio] 86ea8a95a4: kernel BUG at drivers/base/driver.c:153! Message-ID: <20160531024421.GA28112@sophia> References: <20160531022454.GA4923@yexl-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <20160531022454.GA4923@yexl-desktop> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 31, 2016 at 10:24:54AM +0800, kernel test robot wrote: > > >FYI, we noticed the following commit: > >https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master >commit 86ea8a95a42f752fe0aa1c7ad1bfe8ce9be5d30e ("gpio: 104-idio-16: Utilize the ISA bus driver") > > >on test machine: vm-vp-quantal-i386: 1 threads qemu-system-i386 -enable-kvm -cpu Haswell,+smep,+smap with 360M memory > >caused below changes: > > >+------------------------------------------------------------------+------------+------------+ >| | 72bf7443ba | 86ea8a95a4 | >+------------------------------------------------------------------+------------+------------+ >| boot_successes | 0 | 0 | >| boot_failures | 12 | 12 | >| invoked_oom-killer:gfp_mask=0x | 12 | | >| Mem-Info | 12 | | >| Kernel_panic-not_syncing:Out_of_memory_and_no_killable_processes | 12 | | >| backtrace:btrfs_test_extent_io | 12 | | >| backtrace:init_btrfs_fs | 12 | | >| backtrace:kernel_init_freeable | 12 | 12 | >| page_allocation_failure:order:#,mode:#(GFP_KERNEL|__GFP_NORETRY) | 1 | | >| warn_alloc_failed+0x | 1 | | >| backtrace:ring_buffer_consumer_thread | 1 | | >| kernel_BUG_at_drivers/base/driver.c | 0 | 12 | >| invalid_opcode:#[##]SMP_DEBUG_PAGEALLOC | 0 | 12 | >| EIP_is_at_driver_register | 0 | 12 | >| Kernel_panic-not_syncing:Fatal_exception | 0 | 12 | >| backtrace:isa_register_driver | 0 | 12 | >| backtrace:idio_16_driver_init | 0 | 12 | >+------------------------------------------------------------------+------------+------------+ > > > >[ 10.002548] xz_dec_test: module loaded >[ 10.003490] xz_dec_test: Create a device node with 'mknod xz_dec_test c 250 0' and write .xz files to it. >[ 10.005742] ------------[ cut here ]------------ >[ 10.006773] kernel BUG at drivers/base/driver.c:153! >[ 10.008042] invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC >[ 10.009379] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.6.0-rc4-00031-g86ea8a9 #1 >[ 10.011155] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Debian-1.8.2-1 04/01/2014 >[ 10.013090] task: d3e6e000 ti: d3e78000 task.ti: d3e78000 >[ 10.014213] EIP: 0060:[] EFLAGS: 00010246 CPU: 0 >[ 10.015351] EIP is at driver_register+0x29/0xbc >[ 10.016365] EAX: c1ec186c EBX: c1dea3d8 ECX: 00000000 EDX: 00000001 >[ 10.017576] ESI: 00000000 EDI: c9fb9340 EBP: d3e79f00 ESP: d3e79ef8 >[ 10.018782] DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068 >[ 10.019897] CR0: 80050033 CR2: 00000000 CR3: 01fed000 CR4: 000406d0 >[ 10.021104] Stack: >[ 10.021834] c1dea3c0 00000000 d3e79f20 c15dedf7 00000286 00000000 00000286 c1f23128 >[ 10.024194] 00000000 c9fb9340 d3e79f28 c1f2313b d3e79f84 c1ee7c5b d4d7a500 00000000 >[ 10.026562] d3e79f00 c106ee1e 00000000 c1d83ad4 00060006 c1d80bf4 00000259 d4d7a5f8 >[ 10.028924] Call Trace: >[ 10.029702] [] isa_register_driver+0x2b/0x11a >[ 10.030806] [] ? gpiolib_debugfs_init+0x1f/0x1f >[ 10.031929] [] idio_16_driver_init+0x13/0x15 >[ 10.033028] [] do_one_initcall+0xf7/0x1a4 >[ 10.034092] [] ? parse_args+0x282/0x38b >[ 10.035143] [] ? kernel_init_freeable+0x171/0x212 >[ 10.036287] [] kernel_init_freeable+0x194/0x212 >[ 10.037418] [] kernel_init+0xd/0xd5 >[ 10.038424] [] ret_from_kernel_thread+0x21/0x38 >[ 10.039547] [] ? rest_init+0x116/0x116 >[ 10.040576] Code: 5d c3 55 89 e5 56 53 3e 8d 74 26 00 31 d2 89 c3 8b 40 04 8b 70 48 b8 6c 18 ec c1 85 f6 0f 94 c2 31 c9 e8 08 1c b2 ff 85 f6 75 02 <0f> 0b 8b 43 04 83 78 24 00 74 06 83 7b 20 00 75 18 83 78 28 00 >[ 10.048568] EIP: [] driver_register+0x29/0xbc SS:ESP 0068:d3e79ef8 >[ 10.050047] ---[ end trace 7b29a3068007f652 ]--- >[ 10.066206] Kernel panic - not syncing: Fatal exception > > >FYI, raw QEMU command line is: > > qemu-system-i386 -enable-kvm -cpu Haswell,+smep,+smap -kernel /pkg/linux/i386-randconfig-x0-05280946/gcc-6/86ea8a95a42f752fe0aa1c7ad1bfe8ce9be5d30e/vmlinuz-4.6.0-rc4-00031-g86ea8a9 -append 'root=/dev/ram0 user=lkp job=/lkp/scheduled/vm-vp-quantal-i386-61/bisect_boot-1-quantal-core-i386.cgz-i386-randconfig-x0-05280946-86ea8a95a42f752fe0aa1c7ad1bfe8ce9be5d30e-20160530-53474-w6nzwk-0.yaml ARCH=i386 kconfig=i386-randconfig-x0-05280946 branch=linux-devel/devel-spot-201605280759 commit=86ea8a95a42f752fe0aa1c7ad1bfe8ce9be5d30e BOOT_IMAGE=/pkg/linux/i386-randconfig-x0-05280946/gcc-6/86ea8a95a42f752fe0aa1c7ad1bfe8ce9be5d30e/vmlinuz-4.6.0-rc4-00031-g86ea8a9 max_uptime=600 RESULT_ROOT=/result/boot/1/vm-vp-quantal-i386/quantal-core-i386.cgz/i386-randconfig-x0-05280946/gcc-6/86ea8a95a42f752fe0aa1c7ad1bfe8ce9be5d30e/0 LKP_SERVER=inn earlyprintk=ttyS0,115200 systemd.log_level=err debug apic=debug sysrq_always_enabled rcupdate.rcu_cpu_stall_timeout=100 panic=-1 softlockup_panic=1 nmi_watchdog=panic oops=panic load_ramdisk=2 prompt_ramdisk=0 console=ttyS0,115200 console=tty0 vga=normal rw ip=::::vm-vp-quantal-i386-61::dhcp drbd.minor_count=8' -initrd /fs/sdd1/initrd-vm-vp-quantal-i386-61 -m 360 -smp 1 -device e1000,netdev=net0 -netdev user,id=net0 -boot order=nc -no-reboot -watchdog i6300esb -rtc base=localtime -pidfile /dev/shm/kboot/pid-vm-vp-quantal-i386-61 -serial file:/dev/shm/kboot/serial-vm-vp-quantal-i386-61 -daemonize -display none -monitor null > > > > > >Thanks, >Xiaolong Hello, I believe this bug occurs when isa_register_driver is called before isa_bus_init; this is possible with built-in drivers since isa_bus_init is registered via device_initcall within the drivers/base/isa.c file. I submitted a patch addressing this on May 11; see: https://lkml.org/lkml/2016/5/11/857. Let me know if this fixes the bug, or if there are any other issues. Thank you, William Breathitt Gray