[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20170301011431.v7pgh2qwpgoz2lan@wfg-t540p.sh.intel.com>
Date: Wed, 1 Mar 2017 09:14:31 +0800
From: Fengguang Wu <fengguang.wu@...el.com>
To: Rob Herring <robh@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, LKP <lkp@...org>
Subject: [driver core] bea5b158ff WARNING: CPU: 0 PID: 1 at
drivers/ata/libata-core.c:6482 ata_host_detach
Hi Rob,
This looks like a bug of CONFIG_DEBUG_TEST_DRIVER_REMOVE
according to comments here:
https://bugzilla.redhat.com/show_bug.cgi?id=1382530
> + if (test_remove) {
> + test_remove = false;
> +
> + if (dev->bus && dev->bus->remove)
> + dev->bus->remove(dev);
> + else if (drv->remove)
> + drv->remove(dev);
The code checks for the remove() member functions, but if none of those are
available, it only skips calling them -- it does not skip releasing other
resources, and also doesn't skip calling probe() on the device that is still
bound.
> +
> + devres_release_all(dev);
> + driver_sysfs_remove(dev);
> + dev->driver = NULL;
> + dev_set_drvdata(dev, NULL);
> + if (dev->pm_domain && dev->pm_domain->dismiss)
> + dev->pm_domain->dismiss(dev);
> + pm_runtime_reinit(dev);
> +
> + goto re_probe;
> + }
> +
> pinctrl_init_done(dev);
commit bea5b158ff0da9c7246ff391f754f5f38e34577a
Author: Rob Herring <robh@...nel.org>
AuthorDate: Thu Aug 11 10:20:58 2016 -0500
Commit: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CommitDate: Wed Aug 31 15:13:55 2016 +0200
driver core: add test of driver remove calls during probe
In recent discussions on ksummit-discuss[1], it was suggested to do a
sequence of probe, remove, probe for testing driver remove paths. This
adds a kconfig option for said test.
[1] https://lists.linuxfoundation.org/pipermail/ksummit-discuss/2016-August/003459.html
Suggested-by: Arnd Bergmann <arnd@...db.de>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Signed-off-by: Rob Herring <robh@...nel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
cebf8fd169 driver core: fix race between creating/querying glue dir and its cleanup
bea5b158ff driver core: add test of driver remove calls during probe
+-------------------------------------------------------+------------+------------+
| | cebf8fd169 | bea5b158ff |
+-------------------------------------------------------+------------+------------+
| boot_successes | 92 | 0 |
| boot_failures | 0 | 23 |
| WARNING:at_drivers/ata/libata-core.c:#ata_host_detach | 0 | 23 |
| calltrace:piix_init | 0 | 23 |
| calltrace:init | 0 | 23 |
| WARNING:at_lib/list_debug.c:#__list_add | 0 | 19 |
| BUG:workqueue_lockup-pool | 0 | 19 |
| BUG:unable_to_handle_kernel | 0 | 4 |
| Oops | 0 | 4 |
| calltrace:eth_driver_init | 0 | 4 |
| Kernel_panic-not_syncing:Fatal_exception | 0 | 4 |
+-------------------------------------------------------+------------+------------+
[ 4.242180] scsi host0: ata_piix
[ 4.242861] scsi host1: ata_piix
[ 4.243480] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc200 irq 14
[ 4.244473] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc208 irq 15
[ 4.245474] ------------[ cut here ]------------
[ 4.246494] WARNING: CPU: 0 PID: 1 at drivers/ata/libata-core.c:6482 ata_host_detach+0x84/0x170
[ 4.247999] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.8.0-rc4-00003-gbea5b15 #1
[ 4.249482] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20161025_171302-gandalf 04/01/2014
[ 4.252005] 0000000000000000 ffff88000006bc08 ffffffff8158ed6c 0000000000000001
[ 4.254244] ffffffff8296cad8 0000000000000000 0000000000000000 ffff88000006bc58
[ 4.256446] ffffffff81082615 0000000000000000 0000195200066000 ffffffff810b8510
[ 4.257568] Call Trace:
[ 4.257925] [<ffffffff8158ed6c>] dump_stack+0x67/0x9b
[ 4.259679] [<ffffffff81082615>] __warn+0xe5/0x110
[ 4.260371] [<ffffffff810b8510>] ? wait_woken+0x90/0x90
[ 4.262096] [<ffffffff81082658>] warn_slowpath_null+0x18/0x20
[ 4.262918] [<ffffffff819902b4>] ata_host_detach+0x84/0x170
[ 4.264851] [<ffffffff819903d0>] ata_pci_remove_one+0x10/0x20
[ 4.265680] [<ffffffff819b1543>] piix_remove_one+0x33/0x40
[ 4.267570] [<ffffffff8160be0f>] pci_device_remove+0x3f/0xc0
[ 4.268379] [<ffffffff817113dd>] driver_probe_device+0x20d/0x460
[ 4.270208] [<ffffffff817116f6>] __driver_attach+0xc6/0x100
[ 4.271012] [<ffffffff81711630>] ? driver_probe_device+0x460/0x460
[ 4.271938] [<ffffffff81711630>] ? driver_probe_device+0x460/0x460
[ 4.273806] [<ffffffff8170f49c>] bus_for_each_dev+0x5c/0xa0
[ 4.274609] [<ffffffff81710dc9>] driver_attach+0x19/0x20
[ 4.276500] [<ffffffff8171080b>] bus_add_driver+0x14b/0x240
[ 4.277305] [<ffffffff81711f2c>] driver_register+0x8c/0xd0
[ 4.278096] [<ffffffff82f04ab2>] ? qs_ata_pci_driver_init+0x1b/0x1b
[ 4.280093] [<ffffffff8160bf8f>] __pci_register_driver+0x4f/0x60
[ 4.280952] [<ffffffff817130b1>] ? __platform_driver_register+0x31/0x40
[ 4.282876] [<ffffffff82f04acb>] piix_init+0x19/0x29
[ 4.283642] [<ffffffff82ec49da>] do_one_initcall+0x88/0x123
[ 4.285421] [<ffffffff82ec4c14>] kernel_init_freeable+0x16b/0x204
[ 4.286294] [<ffffffff82ec4cad>] ? kernel_init_freeable+0x204/0x204
[ 4.288309] [<ffffffff822de859>] kernel_init+0x9/0x100
[ 4.289045] [<ffffffff822e967f>] ret_from_fork+0x1f/0x40
[ 4.289813] [<ffffffff822de850>] ? rest_init+0x80/0x80
[ 4.291681] ---[ end trace b59c9941603bd54c ]---
[ 4.399732] ata2.01: NODEV after polling detection
git bisect start v4.9 v4.8 --
git bisect bad 9fe68cad6e74967b88d0c6aeca7d9cd6b6e91942 # 18:07 0- 4 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
git bisect bad 5fa0eb0b4d4780fbd6d8a09850cc4fd539e9fe65 # 18:21 0- 4 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
git bisect bad d8ea757b25ec82687c497fc90aa83f9bcea24b5b # 18:31 0- 10 Merge tag 'xtensa-20161005' of git://github.com/jcmvbkbc/linux-xtensa
git bisect bad e6445f52d9c8b0e6557a45fa7d0e8e088d430a8c # 18:41 0- 3 Merge tag 'usb-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
git bisect good 1a4a2bc460721bc8f91e4c1294d39b38e5af132f # 19:04 23+ 0 Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
git bisect good 49deffe0b0e4c2030696c7a6fd680bacf4761069 # 19:24 21+ 0 Merge tag 'arc-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc
git bisect good 597f03f9d133e9837d00965016170271d4f87dcf # 20:02 22+ 0 Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
git bisect bad 9929780e86854833e649b39b290b5fe921eb1701 # 20:16 0- 2 Merge tag 'driver-core-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
git bisect good 7a53eea1f7b527fd3b6d7ca992914840981afe99 # 21:07 21+ 0 Merge tag 'char-misc-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
git bisect bad 775115c06091fcfa1189a50aca488fa596839617 # 21:22 0- 1 drivers/base dmam_declare_coherent_memory leaks
git bisect bad 426bc8e789f8ac84270b196191904d347586032f # 21:39 0- 1 base: soc: make it explicitly non-modular
git bisect bad bea5b158ff0da9c7246ff391f754f5f38e34577a # 21:54 0- 1 driver core: add test of driver remove calls during probe
git bisect good cebf8fd16900fdfd58c0028617944f808f97fe50 # 22:40 21+ 0 driver core: fix race between creating/querying glue dir and its cleanup
# first bad commit: [bea5b158ff0da9c7246ff391f754f5f38e34577a] driver core: add test of driver remove calls during probe
git bisect good cebf8fd16900fdfd58c0028617944f808f97fe50 # 00:11 67+ 0 driver core: fix race between creating/querying glue dir and its cleanup
# extra tests with CONFIG_DEBUG_INFO_REDUCED
git bisect bad bea5b158ff0da9c7246ff391f754f5f38e34577a # 00:24 0- 1 driver core: add test of driver remove calls during probe
# extra tests on HEAD of linux-devel/devel-spot-201702281533
git bisect bad 300c557cbe3976239bc59db3d8660b1aeff0bbf1 # 00:24 0- 39 0day head guard for 'devel-spot-201702281533'
# extra tests on tree/branch linus/master
git bisect bad 86292b33d4b79ee03e2f43ea0381ef85f077c760 # 00:35 0- 1 Merge branch 'akpm' (patches from Andrew)
# extra tests on tree/branch linux-next/master
git bisect bad 8d01c069486aca75b8f6018a759215b0ed0c91f0 # 00:35 0- 22 Add linux-next specific files for 20170228
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/lkp Intel Corporation
Download attachment "dmesg-yocto-ivb41-140:20170228222758:x86_64-randconfig-s2-02281547:4.8.0-rc4-00003-gbea5b15:1.gz" of type "application/gzip" (20579 bytes)
View attachment "reproduce-yocto-ivb41-140:20170228222758:x86_64-randconfig-s2-02281547:4.8.0-rc4-00003-gbea5b15:1" of type "text/plain" (903 bytes)
View attachment "config-4.8.0-rc4-00003-gbea5b15" of type "text/plain" (115053 bytes)
Powered by blists - more mailing lists