Greetings, 0day kernel testing robot got the below dmesg and the first bad commit is https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master commit cac513f1a9f7ace21d27665435f8fe7e39050396 Author: Dmitry Torokhov AuthorDate: Thu Feb 9 10:15:52 2017 -0800 Commit: Greg Kroah-Hartman CommitDate: Fri Feb 10 15:57:28 2017 +0100 auxdisplay: ht16k33: rework input device initialization This patch fixes following issues in input device (keypad) handling: - requesting IRQ before allocating and initializing parts of the device that can be referenced from IRQ handler is racy, even if we try to disable interrupt after requesting it. Let's move allocations around so that everything is ready by the time we request IRQ. - using threaded interrupt handler to schedule a work item it sub-optimal. Disabling and then re-enabling interrupts in work item and in open/close methods is prone to races and exactly the reason theraded interrupts were introduced. Let's use the infrastructure properly and keep scanning the matrix array in IRQ thread, stopping when there are no keys, or when told to do so. Signed-off-by: Dmitry Torokhov Tested-by: Robin van der Gracht Signed-off-by: Greg Kroah-Hartman cac513f1a9 auxdisplay: ht16k33: rework input device initialization +--------------------------------------------------------------------+----+ | | | +--------------------------------------------------------------------+----+ | boot_successes | 0 | | boot_failures | 26 | | BUG:KASAN:global-out-of-bounds_in__of_match_node_at_addr | 26 | | BUG:KASAN:global-out-of-bounds_in__of_device_is_compatible_at_addr | 26 | +--------------------------------------------------------------------+----+ [ 16.004589] OF: /testcase-data/phandle-tests/consumer-a: arguments longer than property [ 16.008292] irq: no irq domain found for /testcase-data/interrupts/intc0 ! [ 16.008292] irq: no irq domain found for /testcase-data/interrupts/intc0 ! [ 16.011090] ================================================================== [ 16.011090] ================================================================== [ 16.014687] BUG: KASAN: global-out-of-bounds in __of_match_node+0xf9/0x100 at addr ffffffff82ea8cf8 [ 16.014687] BUG: KASAN: global-out-of-bounds in __of_match_node+0xf9/0x100 at addr ffffffff82ea8cf8 [ 16.018072] Read of size 1 by task swapper/1 [ 16.018072] Read of size 1 by task swapper/1 [ 16.019363] Address belongs to variable img_ascii_lcd_matches+0x258/0x8c0 [ 16.019363] Address belongs to variable img_ascii_lcd_matches+0x258/0x8c0 [ 16.021741] CPU: 0 PID: 1 Comm: swapper Not tainted 4.10.0-rc7-00153-gcac513f #2 [ 16.021741] CPU: 0 PID: 1 Comm: swapper Not tainted 4.10.0-rc7-00153-gcac513f #2 [ 16.024296] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20161025_171302-gandalf 04/01/2014 [ 16.024296] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20161025_171302-gandalf 04/01/2014 [ 16.027579] Call Trace: [ 16.027579] Call Trace: [ 16.028433] dump_stack+0x19/0x29 [ 16.028433] dump_stack+0x19/0x29 [ 16.029555] kasan_report_error+0x4a8/0x4d0 [ 16.029555] kasan_report_error+0x4a8/0x4d0 [ 16.030752] ? save_stack+0xb1/0xd0 [ 16.030752] ? save_stack+0xb1/0xd0 [ 16.032046] __asan_report_load1_noabort+0x3d/0x40 [ 16.032046] __asan_report_load1_noabort+0x3d/0x40 [ 16.033507] ? __of_match_node+0xf9/0x100 [ 16.033507] ? __of_match_node+0xf9/0x100 [ 16.034773] __of_match_node+0xf9/0x100 [ 16.034773] __of_match_node+0xf9/0x100 [ 16.036266] of_match_node+0x29/0x50 [ 16.036266] of_match_node+0x29/0x50 [ 16.037363] of_match_device+0x43/0x60 [ 16.037363] of_match_device+0x43/0x60 [ 16.038487] ? _raw_spin_unlock+0x22/0x30 [ 16.038487] ? _raw_spin_unlock+0x22/0x30 [ 16.039884] platform_match+0xa4/0x280 [ 16.039884] platform_match+0xa4/0x280 [ 16.041094] __device_attach_driver+0xb5/0x260 [ 16.041094] __device_attach_driver+0xb5/0x260 [ 16.042516] ? __driver_attach+0x1c0/0x1c0 [ 16.042516] ? __driver_attach+0x1c0/0x1c0 [ 16.043950] bus_for_each_drv+0x112/0x1b0 [ 16.043950] bus_for_each_drv+0x112/0x1b0 [ 16.045221] ? subsys_find_device_by_id+0x300/0x300 [ 16.045221] ? subsys_find_device_by_id+0x300/0x300 [ 16.046684] ? wait_for_completion_killable_timeout+0x460/0x460 [ 16.046684] ? wait_for_completion_killable_timeout+0x460/0x460 [ 16.048799] __device_attach+0x18b/0x200 [ 16.048799] __device_attach+0x18b/0x200 [ 16.049978] ? device_bind_driver+0xb0/0xb0 [ 16.049978] ? device_bind_driver+0xb0/0xb0 [ 16.051041] ? kobject_uevent_env+0x22e/0xad0 [ 16.051041] ? kobject_uevent_env+0x22e/0xad0 [ 16.052314] ? klist_add_tail+0xef/0x150 [ 16.052314] ? klist_add_tail+0xef/0x150 [ 16.054010] device_initial_probe+0xe/0x10 [ 16.054010] device_initial_probe+0xe/0x10 [ 16.055861] bus_probe_device+0x1aa/0x250 [ 16.055861] bus_probe_device+0x1aa/0x250 [ 16.057567] device_add+0x7c7/0x1280 [ 16.057567] device_add+0x7c7/0x1280 [ 16.059070] ? dev_warn+0xe0/0xe0 [ 16.059070] ? dev_warn+0xe0/0xe0 [ 16.060586] of_device_add+0xad/0x110 [ 16.060586] of_device_add+0xad/0x110 [ 16.062148] of_platform_device_create_pdata+0x103/0x160 [ 16.062148] of_platform_device_create_pdata+0x103/0x160 [ 16.064439] of_platform_bus_create+0x22f/0x410 [ 16.064439] of_platform_bus_create+0x22f/0x410 [ 16.066384] ? of_platform_device_create_pdata+0x160/0x160 [ 16.066384] ? of_platform_device_create_pdata+0x160/0x160 [ 16.068856] of_platform_populate+0x39/0x90 [ 16.068856] of_platform_populate+0x39/0x90 [ 16.070659] of_platform_default_populate+0x16/0x20 [ 16.070659] of_platform_default_populate+0x16/0x20 [ 16.072817] of_unittest_platform_populate+0xa7/0x40e [ 16.072817] of_unittest_platform_populate+0xa7/0x40e [ 16.074992] ? of_irq_find_parent+0xc0/0xc0 [ 16.074992] ? of_irq_find_parent+0xc0/0xc0 [ 16.076809] ? of_unittest_check_node_linkage+0xd5/0xd5 [ 16.076809] ? of_unittest_check_node_linkage+0xd5/0xd5 [ 16.078972] of_unittest+0x24f4/0x259d [ 16.078972] of_unittest+0x24f4/0x259d [ 16.080296] ? of_unittest_check_tree_linkage+0xb2/0xb2 [ 16.080296] ? of_unittest_check_tree_linkage+0xb2/0xb2 [ 16.082204] ? vprintk_default+0x1a/0x20 [ 16.082204] ? vprintk_default+0x1a/0x20 [ 16.083327] ? printk+0x93/0xaf [ 16.083327] ? printk+0x93/0xaf [ 16.084515] ? kzalloc+0x10/0x10 [ 16.084515] ? kzalloc+0x10/0x10 [ 16.085676] ? edd_init+0x153/0x6a9 [ 16.085676] ? edd_init+0x153/0x6a9 [ 16.086854] ? esb_driver_init+0x1b/0x1b [ 16.086854] ? esb_driver_init+0x1b/0x1b [ 16.088198] ? of_unittest_check_tree_linkage+0xb2/0xb2 [ 16.088198] ? of_unittest_check_tree_linkage+0xb2/0xb2 [ 16.089932] do_one_initcall+0x11f/0x207 [ 16.089932] do_one_initcall+0x11f/0x207 [ 16.091050] ? start_kernel+0x56c/0x56c [ 16.091050] ? start_kernel+0x56c/0x56c [ 16.092478] ? parse_args+0x412/0x820 [ 16.092478] ? parse_args+0x412/0x820 [ 16.093650] ? __usermodehelper_set_disable_depth+0x3d/0x40 [ 16.093650] ? __usermodehelper_set_disable_depth+0x3d/0x40 [ 16.095302] kernel_init_freeable+0x3b2/0x43e [ 16.095302] kernel_init_freeable+0x3b2/0x43e [ 16.096884] ? rest_init+0xe0/0xe0 [ 16.096884] ? rest_init+0xe0/0xe0 [ 16.097905] kernel_init+0xe/0x110 [ 16.097905] kernel_init+0xe/0x110 [ 16.098932] ? rest_init+0xe0/0xe0 [ 16.098932] ? rest_init+0xe0/0xe0 [ 16.100229] ret_from_fork+0x2c/0x40 [ 16.100229] ret_from_fork+0x2c/0x40 [ 16.101284] Memory state around the buggy address: [ 16.101284] Memory state around the buggy address: [ 16.102705] ffffffff82ea8b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 16.102705] ffffffff82ea8b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 16.105304] ffffffff82ea8c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 git bisect start 1820955fd468ff3c37aae0653e546bf2517c705e 7089db84e356562f8ba737c29e472cc42d530dbc -- git bisect bad c1152191ee09d8d5fd59bc9d2578f7abb211354c # 01:06 0- 1 Merge 'khilman-linux-amlogic/for-next' into devel-hourly-2017021909 git bisect good 1be341f4313e168e1348b9305f89fd15a8837038 # 01:23 20+ 22 Merge 'linux-review/Shiva-Kerdel/Staging-ks7010-ks_-Use-the-BIT-macro-for-bitwise-checks/20170217-075323' into devel-hourly-2017021909 git bisect good 60a1bb893867306b1ac1fb80ebb0b155bd9c7043 # 01:38 22+ 22 Merge 'linux-review/Gustavo-A-R-Silva/usb-storage-add-missing-pre-increment-to-variable/20170215-154353' into devel-hourly-2017021909 git bisect good 4cd1042777431e4de2b7a01a8e6a32f4851bafbf # 02:04 22+ 22 Merge 'linux-review/yegorslists-googlemail-com/ARM-dts-AM35x-Add-hecc-node/20170217-215527' into devel-hourly-2017021909 git bisect bad 5cfd8d419497c1bc4e2c9ca61b436cfb78dd4a15 # 02:15 0- 17 Merge 'linux-review/Rameshwar-Prasad-Sahu/ata-xgene-Enable-NCQ-support-for-APM-X-Gene-SATA-controller-hardware-v1-1/20170214-205241' into devel-hourly-2017021909 git bisect good 4e8fa9d36472d17695157a70cd12e6d082385f32 # 02:25 21+ 21 Merge 'andersson-remoteproc/rpmsg-next' into devel-hourly-2017021909 git bisect bad 8cb0fbc3441f3641359c5c37d9850a889d22b2ce # 02:37 0- 5 Merge 'rdma/k.o/for-4.11' into devel-hourly-2017021909 git bisect good f3255cef5f132c70602f9f9a1be3af23682b17ec # 02:47 22+ 22 Merge 'linux-review/Ivan-Khoronzhuk/net-ethernet-ti-cpsw-correct-ale-dev-to-cpsw/20170216-020406' into devel-hourly-2017021909 git bisect good ccef6766d910b2700e463a3f299d02b2988f5606 # 03:04 22+ 22 Merge 'linux-review/Joao-Pinto/add-support-for-multiple-queues-channels-in-stmmac/20170216-194017' into devel-hourly-2017021909 git bisect bad d0892d5ba431fac2fdec8782af7c267f2dbbb9f8 # 03:15 0- 22 Merge 'char-misc/char-misc-next' into devel-hourly-2017021909 git bisect good 5883319ff94dce8497ba71b03f439db35a48baf8 # 03:29 22+ 22 Merge 'linux-review/Imran-Khan/soc-qcom-Add-SoC-info-driver/20170216-191952' into devel-hourly-2017021909 git bisect good 846569641069da86e0d097650ea2fd6565ee8cd8 # 03:42 22+ 43 Merge 'linux-review/Jeremy-Kerr/irq-clarify-logic-calculating-bogus-irqreturn_t-values/20170216-123007' into devel-hourly-2017021909 git bisect good eb67bc3ffd1796e198fc923da2ba15beb7965529 # 03:59 21+ 21 tools: firmware: add fallback cancelation testing git bisect good 84a1ed0407d209beff4d9cb41120d0f69a89d4b8 # 04:15 21+ 21 misc: panel: Fix LCD_FLAG_F/LCD_FLAG_N exchange git bisect bad 8fa8bea728c261551baed01ef230e1138f2944ce # 04:32 0- 22 auxdisplay: ht16k33: remove private workqueue git bisect good dee863b571b0a76e9c549ee99e8782bb4bc6502b # 04:42 20+ 20 hv: export current Hyper-V clocksource git bisect good f6c4391553573d592212e6624cfba5e2752cd5c8 # 05:00 22+ 22 vmbus: remove no longer used signal_policy git bisect good 372b1e91343e657a7cc5e2e2bcecd5140ac28119 # 05:10 22+ 22 drivers: hv: Turn off write permission on the hypercall page git bisect bad cac513f1a9f7ace21d27665435f8fe7e39050396 # 05:22 0- 24 auxdisplay: ht16k33: rework input device initialization git bisect good bbd39d1e4ada551d0d7e7a39f97382fa24b5e7c0 # 05:33 22+ 47 auxdisplay: ht16k33: do not try to free fbdev # first bad commit: [cac513f1a9f7ace21d27665435f8fe7e39050396] auxdisplay: ht16k33: rework input device initialization git bisect good bbd39d1e4ada551d0d7e7a39f97382fa24b5e7c0 # 05:35 66+ 113 auxdisplay: ht16k33: do not try to free fbdev # extra tests with CONFIG_DEBUG_INFO_REDUCED git bisect bad cac513f1a9f7ace21d27665435f8fe7e39050396 # 05:47 0- 3 auxdisplay: ht16k33: rework input device initialization # extra tests on HEAD of linux-devel/devel-hourly-2017021909 git bisect bad 1820955fd468ff3c37aae0653e546bf2517c705e # 05:47 0- 17 0day head guard for 'devel-hourly-2017021909' # extra tests on tree/branch linux-next/master git bisect bad 4ce4a759a3e221b5265ebd03c2f8888b69a7cf3e # 05:57 0- 13 Add linux-next specific files for 20170217 # extra tests with first bad commit reverted --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/lkp Intel Corporation