bisecting cause commit starting from b65054597872ce3aefbc6a666385eabdf9e288da building syzkaller on a0092f9dfdd33924abe5cf5565e4ec4748217c7b testing commit b65054597872ce3aefbc6a666385eabdf9e288da with gcc (GCC) 8.1.0 kernel signature: 1da74d8a524b055bde1c801ec615ae9d15ddecf333d86cec5cbca69e241d0f58 all runs: crashed: possible deadlock in f_getown testing release v5.9 testing commit bbf5c979011a099af5dc76498918ed7df445635b with gcc (GCC) 8.1.0 kernel signature: ad26947ba0cbd73c19f717edb55aa6cd6598fdd9205215e2bf7a994a142d15f3 all runs: OK # git bisect start b65054597872ce3aefbc6a666385eabdf9e288da bbf5c979011a099af5dc76498918ed7df445635b Bisecting: 9042 revisions left to test after this (roughly 13 steps) [4d0e9df5e43dba52d38b251e3b909df8fa1110be] lib, uaccess: add failure injection to usercopy functions testing commit 4d0e9df5e43dba52d38b251e3b909df8fa1110be with gcc (GCC) 8.1.0 kernel signature: f9b3e9c37242883054fb0a410615f3f8a9b8d973053193aada16a8f88f96ba33 all runs: crashed: possible deadlock in f_getown # git bisect bad 4d0e9df5e43dba52d38b251e3b909df8fa1110be Bisecting: 3935 revisions left to test after this (roughly 12 steps) [f888bdf9823c85fe945c4eb3ba353f749dec3856] Merge tag 'devicetree-for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux testing commit f888bdf9823c85fe945c4eb3ba353f749dec3856 with gcc (GCC) 8.1.0 kernel signature: 727e1243224496ab71a1840f28f1fe0bd4fb8102cf18dbc4ee1b6d1eca6a76fa all runs: crashed: possible deadlock in f_getown # git bisect bad f888bdf9823c85fe945c4eb3ba353f749dec3856 Bisecting: 1997 revisions left to test after this (roughly 11 steps) [57218d7f2e87069f73c7a841b6ed6c1cc7acf616] Merge tag 'regmap-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap testing commit 57218d7f2e87069f73c7a841b6ed6c1cc7acf616 with gcc (GCC) 8.1.0 kernel signature: 07b4052ce3770adf65547cd0e5fa467a1ef35254cc3594a914c684c7d6a6ae27 all runs: crashed: possible deadlock in f_getown # git bisect bad 57218d7f2e87069f73c7a841b6ed6c1cc7acf616 Bisecting: 873 revisions left to test after this (roughly 10 steps) [39a5101f989e8d2be557136704d53990f9b402c8] Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 testing commit 39a5101f989e8d2be557136704d53990f9b402c8 with gcc (GCC) 8.1.0 kernel signature: aa462b081385282825e597bfb0c0d6ce7c23a52beca1863bc9f593b78ee56420 all runs: crashed: possible deadlock in f_getown # git bisect bad 39a5101f989e8d2be557136704d53990f9b402c8 Bisecting: 521 revisions left to test after this (roughly 9 steps) [ed016af52ee3035b4799ebd7d53f9ae59d5782c4] Merge tag 'locking-core-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip testing commit ed016af52ee3035b4799ebd7d53f9ae59d5782c4 with gcc (GCC) 8.1.0 kernel signature: 48efec08329bb2146f82f91b20c7dc5cf4a582c26d959e4e539a7123ad3b494d all runs: crashed: possible deadlock in f_getown # git bisect bad ed016af52ee3035b4799ebd7d53f9ae59d5782c4 Bisecting: 274 revisions left to test after this (roughly 8 steps) [f94ab231136c53ee26b1ddda76b29218018834ff] Merge tag 'x86_cleanups_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip testing commit f94ab231136c53ee26b1ddda76b29218018834ff with gcc (GCC) 8.1.0 kernel signature: ce2b4418b144ad52274a930ded035ae700f228a96a244cbc65b471e4e61aa14a all runs: OK # git bisect good f94ab231136c53ee26b1ddda76b29218018834ff Bisecting: 125 revisions left to test after this (roughly 7 steps) [cc7343724eb77ce0752b1097a275f22f6fe47057] Merge tag 'x86-irq-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip testing commit cc7343724eb77ce0752b1097a275f22f6fe47057 with gcc (GCC) 8.1.0 kernel signature: 35062fb28bef6563d1e93a3d942538371f2faff77e9ab3936fbbf0a0f81f6a51 all runs: OK # git bisect good cc7343724eb77ce0752b1097a275f22f6fe47057 Bisecting: 61 revisions left to test after this (roughly 6 steps) [d6c4c11348816fb4d16e33bf47d559d7aa59350a] Merge branch 'kcsan' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into locking/core testing commit d6c4c11348816fb4d16e33bf47d559d7aa59350a with gcc (GCC) 8.1.0 kernel signature: bcadef61484556026183000913c638eb2adf4a5da465174b861680fa9f03dd03 all runs: crashed: possible deadlock in f_getown # git bisect bad d6c4c11348816fb4d16e33bf47d559d7aa59350a Bisecting: 31 revisions left to test after this (roughly 5 steps) [6dd699b13d53f26a7603702d8bada3482312df74] seqlock: seqcount_LOCKNAME_t: Standardize naming convention testing commit 6dd699b13d53f26a7603702d8bada3482312df74 with gcc (GCC) 8.1.0 kernel signature: a66955ac7545ee9bbe52d4db3efa29b488a9b8593dd92f4d4ad7bb8ff47c97d0 all runs: crashed: possible deadlock in f_getown # git bisect bad 6dd699b13d53f26a7603702d8bada3482312df74 Bisecting: 15 revisions left to test after this (roughly 4 steps) [621c9dac0eea7607cb9a57cc9ba47fbcd4e644c9] lockdep: Add recursive read locks into dependency graph testing commit 621c9dac0eea7607cb9a57cc9ba47fbcd4e644c9 with gcc (GCC) 8.1.0 kernel signature: 23beb8dbb9efe5979b31abc40a2d466a9eb49a0fb4fa7367c926f3b5a58236bd all runs: crashed: possible deadlock in f_getown # git bisect bad 621c9dac0eea7607cb9a57cc9ba47fbcd4e644c9 Bisecting: 7 revisions left to test after this (roughly 3 steps) [d563bc6ead9e79be37067d58509a605b67378184] lockdep: Make __bfs() visit every dependency until a match testing commit d563bc6ead9e79be37067d58509a605b67378184 with gcc (GCC) 8.1.0 kernel signature: 7c33c6e91f56570999a60e7af607265bd37cc13fa4de481d7850c94e0edc90ec all runs: crashed: possible deadlock in f_getown # git bisect bad d563bc6ead9e79be37067d58509a605b67378184 Bisecting: 3 revisions left to test after this (roughly 2 steps) [92b4e9f11a636d1723cc0866bf8b9111b1e24339] Documentation/locking/locktypes: Fix local_locks documentation testing commit 92b4e9f11a636d1723cc0866bf8b9111b1e24339 with gcc (GCC) 8.1.0 kernel signature: a436e15c348087f99a42441f3353d3b10288fba05733986b2162e3d761dff5ef all runs: OK # git bisect good 92b4e9f11a636d1723cc0866bf8b9111b1e24339 Bisecting: 1 revision left to test after this (roughly 1 step) [224ec489d3cdb0af6794e257eeee39d98dc9c5b2] lockdep/Documention: Recursive read lock detection reasoning testing commit 224ec489d3cdb0af6794e257eeee39d98dc9c5b2 with gcc (GCC) 8.1.0 kernel signature: dd0471ad274d4e149b24d0fe1cb03129b0fd0ede49ccc58c2b485eb58dd71668 all runs: crashed: possible deadlock in f_getown # git bisect bad 224ec489d3cdb0af6794e257eeee39d98dc9c5b2 Bisecting: 0 revisions left to test after this (roughly 0 steps) [e918188611f073063415f40fae568fa4d86d9044] locking: More accurate annotations for read_lock() testing commit e918188611f073063415f40fae568fa4d86d9044 with gcc (GCC) 8.1.0 kernel signature: dd0471ad274d4e149b24d0fe1cb03129b0fd0ede49ccc58c2b485eb58dd71668 all runs: crashed: possible deadlock in f_getown # git bisect bad e918188611f073063415f40fae568fa4d86d9044 e918188611f073063415f40fae568fa4d86d9044 is the first bad commit commit e918188611f073063415f40fae568fa4d86d9044 Author: Boqun Feng Date: Fri Aug 7 15:42:20 2020 +0800 locking: More accurate annotations for read_lock() On the archs using QUEUED_RWLOCKS, read_lock() is not always a recursive read lock, actually it's only recursive if in_interrupt() is true. So change the annotation accordingly to catch more deadlocks. Note we used to treat read_lock() as pure recursive read locks in lib/locking-seftest.c, and this is useful, especially for the lockdep development selftest, so we keep this via a variable to force switching lock annotation for read_lock(). Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200807074238.1632519-2-boqun.feng@gmail.com include/linux/lockdep.h | 23 ++++++++++++++++++++++- kernel/locking/lockdep.c | 14 ++++++++++++++ lib/locking-selftest.c | 11 +++++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) culprit signature: dd0471ad274d4e149b24d0fe1cb03129b0fd0ede49ccc58c2b485eb58dd71668 parent signature: a436e15c348087f99a42441f3353d3b10288fba05733986b2162e3d761dff5ef revisions tested: 16, total time: 2h22m15.009162578s (build: 1h9m2.386775336s, test: 1h11m44.051392847s) first bad commit: e918188611f073063415f40fae568fa4d86d9044 locking: More accurate annotations for read_lock() recipients (to): ["boqun.feng@gmail.com" "linux-kernel@vger.kernel.org" "mingo@redhat.com" "peterz@infradead.org" "peterz@infradead.org" "will@kernel.org"] recipients (cc): [] crash: possible deadlock in f_getown ======================================================== WARNING: possible irq lock inversion dependency detected 5.9.0-rc2-syzkaller #0 Not tainted -------------------------------------------------------- syz-executor.1/10154 just changed the state of lock: ffff88813462fb38 (&f->f_owner.lock){.+..}-{2:2}, at: f_getown+0x16/0x50 fs/fcntl.c:152 but this lock was taken by another, HARDIRQ-safe lock in the past: (&dev->event_lock){-...}-{2:2} and interrupts could create inverse lock ordering between them. other info that might help us debug this: Chain exists of: &dev->event_lock --> &new->fa_lock --> &f->f_owner.lock Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&f->f_owner.lock); local_irq_disable(); lock(&dev->event_lock); lock(&new->fa_lock); lock(&dev->event_lock); *** DEADLOCK *** no locks held by syz-executor.1/10154. the shortest dependencies between 2nd lock and 1st lock: -> (&dev->event_lock){-...}-{2:2} { IN-HARDIRQ-W at: lock_acquire+0xb0/0x3a0 kernel/locking/lockdep.c:5020 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x33/0x50 kernel/locking/spinlock.c:159 input_event+0x33/0x70 drivers/input/input.c:440 input_report_key include/linux/input.h:417 [inline] psmouse_report_standard_buttons+0x1b/0x50 drivers/input/mouse/psmouse-base.c:123 psmouse_report_standard_packet drivers/input/mouse/psmouse-base.c:141 [inline] psmouse_process_byte+0x70/0x260 drivers/input/mouse/psmouse-base.c:232 psmouse_handle_byte+0xa/0x50 drivers/input/mouse/psmouse-base.c:274 psmouse_interrupt+0xc5/0x3f0 drivers/input/mouse/psmouse-base.c:426 serio_interrupt+0x3b/0x80 drivers/input/serio/serio.c:1002 i8042_interrupt+0x153/0x280 drivers/input/serio/i8042.c:598 __handle_irq_event_percpu+0x3c/0x320 kernel/irq/handle.c:156 handle_irq_event_percpu+0x2b/0x70 kernel/irq/handle.c:196 handle_irq_event+0x2f/0x4c kernel/irq/handle.c:213 handle_edge_irq+0x8f/0x1b0 kernel/irq/chip.c:819 asm_call_on_stack+0xf/0x20 arch/x86/entry/entry_64.S:706 __run_on_irqstack arch/x86/include/asm/irq_stack.h:22 [inline] run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:48 [inline] handle_irq arch/x86/kernel/irq.c:230 [inline] __common_interrupt arch/x86/kernel/irq.c:249 [inline] common_interrupt+0x159/0x220 arch/x86/kernel/irq.c:239 asm_common_interrupt+0x1e/0x40 arch/x86/include/asm/idtentry.h:572 native_restore_fl arch/x86/include/asm/irqflags.h:41 [inline] arch_local_irq_restore arch/x86/include/asm/irqflags.h:84 [inline] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] _raw_spin_unlock_irqrestore+0x25/0x50 kernel/locking/spinlock.c:191 spin_unlock_irqrestore include/linux/spinlock.h:409 [inline] i8042_command+0x35/0x40 drivers/input/serio/i8042.c:348 i8042_aux_write+0x29/0x30 drivers/input/serio/i8042.c:383 serio_write include/linux/serio.h:125 [inline] ps2_do_sendbyte+0xb3/0x260 drivers/input/serio/libps2.c:40 ps2_sendbyte+0x31/0x80 drivers/input/serio/libps2.c:92 cypress_ps2_sendbyte+0x15/0x70 drivers/input/mouse/cypress_ps2.c:42 cypress_ps2_read_cmd_status drivers/input/mouse/cypress_ps2.c:116 [inline] cypress_send_ext_cmd+0xff/0x430 drivers/input/mouse/cypress_ps2.c:189 cypress_detect+0x27/0x80 drivers/input/mouse/cypress_ps2.c:205 psmouse_do_detect+0x2a/0x50 drivers/input/mouse/psmouse-base.c:1009 psmouse_try_protocol+0xb1/0x170 drivers/input/mouse/psmouse-base.c:1023 psmouse_extensions+0x1f6/0x420 drivers/input/mouse/psmouse-base.c:1146 psmouse_switch_protocol+0x145/0x1f0 drivers/input/mouse/psmouse-base.c:1542 psmouse_connect+0x1b7/0x370 drivers/input/mouse/psmouse-base.c:1632 serio_connect_driver+0x24/0x40 drivers/input/serio/serio.c:47 really_probe+0xd1/0x400 drivers/base/dd.c:553 driver_probe_device+0xd9/0x140 drivers/base/dd.c:738 device_driver_attach+0x4a/0x50 drivers/base/dd.c:1013 __driver_attach+0x80/0x140 drivers/base/dd.c:1090 bus_for_each_dev+0x71/0xb0 drivers/base/bus.c:305 serio_attach_driver drivers/input/serio/serio.c:808 [inline] serio_handle_event+0x1ee/0x250 drivers/input/serio/serio.c:227 process_one_work+0x26a/0x5f0 kernel/workqueue.c:2269 worker_thread+0x38/0x380 kernel/workqueue.c:2415 kthread+0x148/0x170 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 INITIAL USE at: lock_acquire+0xb0/0x3a0 kernel/locking/lockdep.c:5020 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x33/0x50 kernel/locking/spinlock.c:159 input_inject_event+0x44/0x1b6 drivers/input/input.c:466 led_trigger_event+0x3c/0x60 drivers/leds/led-triggers.c:387 kbd_led_trigger_activate+0x4b/0x60 drivers/tty/vt/keyboard.c:1005 led_trigger_set+0x1fc/0x300 drivers/leds/led-triggers.c:195 led_trigger_set_default+0x8b/0xb0 drivers/leds/led-triggers.c:259 led_classdev_register_ext+0x23d/0x310 drivers/leds/led-class.c:412 led_classdev_register include/linux/leds.h:190 [inline] input_leds_connect+0x177/0x2ff drivers/input/input-leds.c:139 input_attach_handler+0x68/0x90 drivers/input/input.c:1031 input_register_device.cold.22+0xa4/0x152 drivers/input/input.c:2229 atkbd_connect+0x214/0x30e drivers/input/keyboard/atkbd.c:1293 serio_connect_driver+0x24/0x40 drivers/input/serio/serio.c:47 really_probe+0xd1/0x400 drivers/base/dd.c:553 driver_probe_device+0xd9/0x140 drivers/base/dd.c:738 device_driver_attach+0x4a/0x50 drivers/base/dd.c:1013 __driver_attach+0x80/0x140 drivers/base/dd.c:1090 bus_for_each_dev+0x71/0xb0 drivers/base/bus.c:305 serio_attach_driver drivers/input/serio/serio.c:808 [inline] serio_handle_event+0x1ee/0x250 drivers/input/serio/serio.c:227 process_one_work+0x26a/0x5f0 kernel/workqueue.c:2269 worker_thread+0x38/0x380 kernel/workqueue.c:2415 kthread+0x148/0x170 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 } ... key at: [] __key.34109+0x0/0x10 ... acquired at: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:354 [inline] evdev_pass_values+0x71/0x280 drivers/input/evdev.c:262 evdev_events+0xf7/0x1a0 drivers/input/evdev.c:307 input_to_handler+0x83/0xe0 drivers/input/input.c:115 input_pass_values.part.8+0x1b0/0x260 drivers/input/input.c:145 input_pass_values drivers/input/input.c:134 [inline] input_handle_event+0x4cf/0x5f0 drivers/input/input.c:399 input_inject_event+0x14f/0x1b6 drivers/input/input.c:471 evdev_write+0x136/0x230 drivers/input/evdev.c:530 vfs_write+0xc7/0x230 fs/read_write.c:576 ksys_write+0xb9/0xd0 fs/read_write.c:631 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> (&client->buffer_lock){....}-{2:2} { INITIAL USE at: lock_acquire+0xb0/0x3a0 kernel/locking/lockdep.c:5020 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:354 [inline] evdev_pass_values+0x71/0x280 drivers/input/evdev.c:262 evdev_events+0xf7/0x1a0 drivers/input/evdev.c:307 input_to_handler+0x83/0xe0 drivers/input/input.c:115 input_pass_values.part.8+0x1b0/0x260 drivers/input/input.c:145 input_pass_values drivers/input/input.c:134 [inline] input_handle_event+0x4cf/0x5f0 drivers/input/input.c:399 input_inject_event+0x14f/0x1b6 drivers/input/input.c:471 evdev_write+0x136/0x230 drivers/input/evdev.c:530 vfs_write+0xc7/0x230 fs/read_write.c:576 ksys_write+0xb9/0xd0 fs/read_write.c:631 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 } ... key at: [] __key.36396+0x0/0x10 ... acquired at: __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:223 kill_fasync_rcu fs/fcntl.c:1002 [inline] kill_fasync+0xa7/0x200 fs/fcntl.c:1023 __pass_event drivers/input/evdev.c:240 [inline] evdev_pass_values+0x18a/0x280 drivers/input/evdev.c:279 evdev_events+0xf7/0x1a0 drivers/input/evdev.c:307 input_to_handler+0x83/0xe0 drivers/input/input.c:115 input_pass_values.part.8+0x1b0/0x260 drivers/input/input.c:145 input_pass_values drivers/input/input.c:134 [inline] input_handle_event+0x4cf/0x5f0 drivers/input/input.c:399 input_inject_event+0x14f/0x1b6 drivers/input/input.c:471 evdev_write+0x136/0x230 drivers/input/evdev.c:530 vfs_write+0xc7/0x230 fs/read_write.c:576 ksys_write+0xb9/0xd0 fs/read_write.c:631 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> (&new->fa_lock){....}-{2:2} { INITIAL USE at: lock_acquire+0xb0/0x3a0 kernel/locking/lockdep.c:5020 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:223 kill_fasync_rcu fs/fcntl.c:1002 [inline] kill_fasync+0xa7/0x200 fs/fcntl.c:1023 __pass_event drivers/input/evdev.c:240 [inline] evdev_pass_values+0x18a/0x280 drivers/input/evdev.c:279 evdev_events+0xf7/0x1a0 drivers/input/evdev.c:307 input_to_handler+0x83/0xe0 drivers/input/input.c:115 input_pass_values.part.8+0x1b0/0x260 drivers/input/input.c:145 input_pass_values drivers/input/input.c:134 [inline] input_handle_event+0x4cf/0x5f0 drivers/input/input.c:399 input_inject_event+0x14f/0x1b6 drivers/input/input.c:471 evdev_write+0x136/0x230 drivers/input/evdev.c:530 vfs_write+0xc7/0x230 fs/read_write.c:576 ksys_write+0xb9/0xd0 fs/read_write.c:631 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 } ... key at: [] __key.45771+0x0/0x10 ... acquired at: __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:223 send_sigio+0x23/0x200 fs/fcntl.c:786 kill_fasync_rcu fs/fcntl.c:1009 [inline] kill_fasync+0xd2/0x200 fs/fcntl.c:1023 __pass_event drivers/input/evdev.c:240 [inline] evdev_pass_values+0x18a/0x280 drivers/input/evdev.c:279 evdev_events+0xf7/0x1a0 drivers/input/evdev.c:307 input_to_handler+0x83/0xe0 drivers/input/input.c:115 input_pass_values.part.8+0x1b0/0x260 drivers/input/input.c:145 input_pass_values drivers/input/input.c:134 [inline] input_handle_event+0x4cf/0x5f0 drivers/input/input.c:399 input_inject_event+0x14f/0x1b6 drivers/input/input.c:471 evdev_write+0x136/0x230 drivers/input/evdev.c:530 vfs_write+0xc7/0x230 fs/read_write.c:576 ksys_write+0xb9/0xd0 fs/read_write.c:631 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> (&f->f_owner.lock){.+..}-{2:2} { HARDIRQ-ON-R at: lock_acquire+0xb0/0x3a0 kernel/locking/lockdep.c:5020 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:223 f_getown+0x16/0x50 fs/fcntl.c:152 sock_ioctl+0x2d2/0x3e0 net/socket.c:1132 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x7c/0xb0 fs/ioctl.c:739 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 INITIAL USE at: lock_acquire+0xb0/0x3a0 kernel/locking/lockdep.c:5020 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:223 send_sigio+0x23/0x200 fs/fcntl.c:786 kill_fasync_rcu fs/fcntl.c:1009 [inline] kill_fasync+0xd2/0x200 fs/fcntl.c:1023 __pass_event drivers/input/evdev.c:240 [inline] evdev_pass_values+0x18a/0x280 drivers/input/evdev.c:279 evdev_events+0xf7/0x1a0 drivers/input/evdev.c:307 input_to_handler+0x83/0xe0 drivers/input/input.c:115 input_pass_values.part.8+0x1b0/0x260 drivers/input/input.c:145 input_pass_values drivers/input/input.c:134 [inline] input_handle_event+0x4cf/0x5f0 drivers/input/input.c:399 input_inject_event+0x14f/0x1b6 drivers/input/input.c:471 evdev_write+0x136/0x230 drivers/input/evdev.c:530 vfs_write+0xc7/0x230 fs/read_write.c:576 ksys_write+0xb9/0xd0 fs/read_write.c:631 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 } ... key at: [] __key.49901+0x0/0x10 ... acquired at: mark_lock_irq kernel/locking/lockdep.c:3568 [inline] mark_lock+0x24f/0x850 kernel/locking/lockdep.c:4006 mark_usage kernel/locking/lockdep.c:3911 [inline] __lock_acquire+0x874/0x2ad0 kernel/locking/lockdep.c:4380 lock_acquire+0xb0/0x3a0 kernel/locking/lockdep.c:5020 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:223 f_getown+0x16/0x50 fs/fcntl.c:152 sock_ioctl+0x2d2/0x3e0 net/socket.c:1132 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x7c/0xb0 fs/ioctl.c:739 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 stack backtrace: CPU: 1 PID: 10154 Comm: syz-executor.1 Not tainted 5.9.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x77/0xa0 lib/dump_stack.c:118 print_irq_inversion_bug kernel/locking/lockdep.c:3429 [inline] check_usage_backwards.cold.63+0x1d/0x26 kernel/locking/lockdep.c:3480 mark_lock_irq kernel/locking/lockdep.c:3568 [inline] mark_lock+0x24f/0x850 kernel/locking/lockdep.c:4006 mark_usage kernel/locking/lockdep.c:3911 [inline] __lock_acquire+0x874/0x2ad0 kernel/locking/lockdep.c:4380 lock_acquire+0xb0/0x3a0 kernel/locking/lockdep.c:5020 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:223 f_getown+0x16/0x50 fs/fcntl.c:152 sock_ioctl+0x2d2/0x3e0 net/socket.c:1132 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x7c/0xb0 fs/ioctl.c:739 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45deb9 Code: 0d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f3792a20c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000001df40 RCX: 000000000045deb9 RDX: 0000000000000000 RSI: 0000000000008904 RDI: 0000000000000004 RBP: 000000000118bf60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bf2c R13: 00007ffd146305df R14: 00007f3792a219c0 R15: 000000000118bf2c