Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1409784

Re: [gpio] 86ea8a95a4: kernel BUG at drivers/base/driver.c:153!

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From William Breathitt Gray <vilhelm.gray@gmail.com>
Newsgroups linux.kernel
Subject Re: [gpio] 86ea8a95a4: kernel BUG at drivers/base/driver.c:153!
Date Tue, 31 May 2016 04:50:02 +0200
Message-ID <rEHUK-4Ly-5@gated-at.bofh.it> (permalink)
References <rEHBn-4Ct-1@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=CYQIWcK8QiqCH97k2ROYnUTD8Lqmsfi07pLabqQnLVc=; b=XReWY/Y/H+Ec2NLopkA/uMPJ1Nm8GPs6gb0oHRMMQUN7iOOsAjeXNvqQnNWmgEDCv+ fL9ZX7Ojd18EAmD3VzKZVNRoTR0M/hX7sAV0UsutAggBsCI1buSkgol2PAXyhDmT+O6r ZGKwdjlScwLvViSNEUuP3N3MBacSI9U/XGXE0QvnG6RuwoNVhrOxLJi/NlYCrJD8SfVh xpT8gFcZGvHCRpoX8pXA5EKgWRI5eJgIzKA3SfpoMFGK57t9aucgIbfGOttP4VCXqM24 eqCowVrwXfHPF7C6/FAzhaeq0pK+1iQO8b14OxoscAwfU2Iz+gJ6Zhk9UZpP1a2JzOHu Cyxw==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=CYQIWcK8QiqCH97k2ROYnUTD8Lqmsfi07pLabqQnLVc=; b=Hyc8z7evUKr9cLwDOIFHpcT8dOltjLlAE4e50QIi6jRE8bvXJ7kND2GYChItN3Vqu/ EhtQoorFEFneOkSQHTbGnmDM/2RpJjqzs7OxMgmDyGcNHoUmuEDIHS7WtBTQDK/E5HkU 0qZpEPVrrGEpdF9vmi03X5fc3O9ezw63WfCowrnr1ayrMIoMtnXatP7CSNyZJ5zkMiJJ 3Z5Ps7jBtISwD9Si7ypdamyRSHMJkfndy+NedKtnxPbhU/jByFlHbgqLVVsuebX8eZI8 XIEM8B19NqO3mod/xum6xeN/t1O54zWPviL3Kqj8fdIJsjtD58c2xmb4s7KjM8evr261 2c1A==
X-Gm-Message-State ALyK8tJIR9YhEKnwMnAIunjW199PWatQawV5h9ETMQB9HvxWaHTPoI7afOWtFNXBdJtiAg==
X-Received by 10.37.223.142 with SMTP id w136mr18430017ybg.139.1464662685541; Mon, 30 May 2016 19:44:45 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Disposition inline
Content-Transfer-Encoding 8BIT
User-Agent Mutt/1.5.24 (2015-08-30)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 98
Organization linux.* mail to news gateway
X-Original-Cc Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Linus Walleij <linus.walleij@linaro.org>, Alexandre Courbot <gnurou@gmail.com>, LKML <linux-kernel@vger.kernel.org>, Linus Torvalds <torvalds@linux-foundation.org>, lkp@01.org
X-Original-Date Mon, 30 May 2016 22:44:39 -0400
X-Original-Message-ID <20160531024421.GA28112@sophia>
X-Original-References <20160531022454.GA4923@yexl-desktop>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1409784

Show key headers only | View raw


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:[<c15d8814>] 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]  [<c15dedf7>] isa_register_driver+0x2b/0x11a
>[   10.030806]  [<c1f23128>] ? gpiolib_debugfs_init+0x1f/0x1f
>[   10.031929]  [<c1f2313b>] idio_16_driver_init+0x13/0x15
>[   10.033028]  [<c1ee7c5b>] do_one_initcall+0xf7/0x1a4
>[   10.034092]  [<c106ee1e>] ? parse_args+0x282/0x38b
>[   10.035143]  [<c1ee7e79>] ? kernel_init_freeable+0x171/0x212
>[   10.036287]  [<c1ee7e9c>] kernel_init_freeable+0x194/0x212
>[   10.037418]  [<c1902636>] kernel_init+0xd/0xd5
>[   10.038424]  [<c1909889>] ret_from_kernel_thread+0x21/0x38
>[   10.039547]  [<c1902629>] ? 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: [<c15d8814>] 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

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: [gpio] 86ea8a95a4: kernel BUG at drivers/base/driver.c:153! William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-05-31 04:50 +0200
  Re: [gpio] 86ea8a95a4: kernel BUG at drivers/base/driver.c:153! Ye Xiaolong <xiaolong.ye@intel.com> - 2016-05-31 10:10 +0200

csiph-web