Jens Axboe
583863ed91
io_uring: initialize ctx->sqo_wait earlier
...
Ensure that ctx->sqo_wait is initialized as soon as the ctx is allocated,
instead of deferring it to the offload setup. This fixes a syzbot
reported lockdep complaint, which is really due to trying to wake_up
on an uninitialized wait queue:
RSP: 002b:00007fffb1fb9aa8 EFLAGS: 00000246 ORIG_RAX: 00000000000001a9
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441319
RDX: 0000000000000001 RSI: 0000000020000140 RDI: 000000000000047b
RBP: 0000000000010475 R08: 0000000000000001 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402260
R13: 00000000004022f0 R14: 0000000000000000 R15: 0000000000000000
INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
CPU: 1 PID: 7090 Comm: syz-executor222 Not tainted 5.7.0-rc1-next-20200415-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+0x188/0x20d lib/dump_stack.c:118
assign_lock_key kernel/locking/lockdep.c:913 [inline]
register_lock_class+0x1664/0x1760 kernel/locking/lockdep.c:1225
__lock_acquire+0x104/0x4c50 kernel/locking/lockdep.c:4234
lock_acquire+0x1f2/0x8f0 kernel/locking/lockdep.c:4934
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x8c/0xbf kernel/locking/spinlock.c:159
__wake_up_common_lock+0xb4/0x130 kernel/sched/wait.c:122
io_cqring_ev_posted+0xa5/0x1e0 fs/io_uring.c:1160
io_poll_remove_all fs/io_uring.c:4357 [inline]
io_ring_ctx_wait_and_kill+0x2bc/0x5a0 fs/io_uring.c:7305
io_uring_create fs/io_uring.c:7843 [inline]
io_uring_setup+0x115e/0x22b0 fs/io_uring.c:7870
do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295
entry_SYSCALL_64_after_hwframe+0x49/0xb3
RIP: 0033:0x441319
Code: e8 5c ae 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 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 bb 0a fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fffb1fb9aa8 EFLAGS: 00000246 ORIG_RAX: 00000000000001a9
Reported-by: syzbot+8c91f5d054e998721c57@syzkaller.appspotmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-05-17 09:20:00 -06:00
..
2020-03-27 09:29:56 +00:00
2020-01-25 11:31:59 -05:00
2019-11-18 14:26:43 +01:00
2020-04-24 16:33:32 +01:00
2020-03-13 21:08:17 -04:00
2019-08-30 07:27:17 -07:00
2019-08-30 07:27:17 -07:00
2020-04-30 12:17:49 +02:00
2020-02-03 08:05:56 -05:00
2020-04-13 19:33:47 +02:00
2020-04-22 20:29:11 -05:00
2019-09-19 09:42:37 -07:00
2019-12-08 19:10:50 -05:00
2020-02-07 14:48:41 -05:00
2020-03-31 12:58:36 -07:00
2020-04-17 17:08:50 +02:00
2019-09-03 09:30:56 -04:00
2019-12-18 18:07:31 +01:00
2020-02-17 21:08:37 -08:00
2020-02-23 21:59:42 +01:00
2019-08-30 07:27:17 -07:00
2020-03-03 23:40:52 +08:00
2020-04-22 20:14:06 +09:00
2019-11-11 09:21:59 -05:00
2020-03-23 13:01:37 +01:00
2020-04-15 23:58:49 -04:00
2020-04-07 13:48:26 -07:00
2020-03-06 07:06:09 -06:00
2019-08-30 07:27:17 -07:00
2020-02-04 03:05:26 +00:00
2020-02-13 09:16:07 +01:00
2020-03-31 14:16:03 -07:00
2019-12-18 18:07:32 +01:00
2020-04-10 15:36:20 -07:00
2020-03-29 23:23:00 +02:00
2019-10-23 17:23:46 +02:00
2020-04-02 09:35:32 -07:00
2020-04-30 07:57:46 -07:00
2019-09-19 09:42:37 -07:00
2020-03-05 20:25:05 -05:00
2020-02-07 14:48:37 -05:00
2020-02-05 05:28:20 +00:00
2020-03-16 15:53:47 -04:00
2020-02-04 03:05:26 +00:00
2019-08-30 07:27:17 -07:00
2020-04-30 15:08:26 -04:00
2019-05-21 10:50:46 +02:00
2020-04-17 12:40:31 -04:00
2019-10-23 17:23:46 +02:00
2019-05-21 10:50:46 +02:00
2020-03-30 12:40:53 +02:00
2020-03-28 13:21:08 +01:00
2020-04-23 13:45:27 -04:00
2019-08-30 08:11:25 -07:00
2019-07-19 10:42:02 -07:00
2020-04-08 09:39:11 -04:00
2020-03-27 16:51:02 +01:00
2020-04-25 12:25:32 -07:00
2020-03-09 14:45:40 -07:00
2019-08-30 07:27:17 -07:00
2019-08-30 07:27:17 -07:00
2020-01-30 15:37:41 -08:00
2020-02-07 14:48:37 -05:00
2020-04-07 10:43:44 -07:00
2019-09-19 10:06:57 -07:00
2019-09-19 10:06:57 -07:00
2020-04-05 11:34:35 -07:00
2019-08-30 07:27:18 -07:00
2019-12-10 22:29:58 -05:00
2020-04-07 12:40:56 -07:00
2020-04-10 15:36:22 -07:00
2019-09-19 09:42:37 -07:00
2020-03-25 11:50:48 +01:00
2020-02-08 17:34:58 -05:00
2020-01-14 13:28:28 -08:00
2020-04-16 09:07:42 -07:00
2020-03-25 11:28:26 +09:00
2020-02-03 17:27:47 -07:00
2019-07-19 10:42:02 -07:00
2019-12-08 19:10:50 -05:00
2019-05-21 10:50:45 +02:00
2019-11-15 14:38:29 +01:00
2020-04-07 10:43:44 -07:00
2019-05-21 10:50:45 +02:00
2019-07-16 19:23:22 -07:00
2019-07-19 10:42:02 -07:00
2019-05-21 10:50:45 +02:00
2020-04-21 09:51:10 -06:00
2020-04-24 12:44:19 -07:00
2020-01-06 20:10:26 +01:00
2019-11-15 14:38:29 +01:00
2019-06-19 17:09:55 +02:00
2020-04-21 11:11:56 -07:00
2019-08-30 19:31:09 -04:00
2020-04-02 19:15:03 -07:00
2019-12-08 11:08:28 -08:00
2019-05-21 10:50:45 +02:00
2020-01-04 13:55:09 -08:00
2019-12-18 00:03:01 -05:00
2020-02-03 17:27:38 -07:00
2020-04-07 10:43:44 -07:00
2020-04-02 11:22:17 -07:00
2020-03-03 10:55:06 -05:00
2019-08-07 21:51:47 -04:00
2019-08-19 11:00:39 -04:00
2020-03-20 08:47:27 -06:00
2020-04-10 15:36:22 -07:00
2020-02-07 14:48:35 -05:00
2020-04-02 09:35:26 -07:00
2019-07-16 22:52:37 -04:00
2019-05-21 10:50:45 +02:00
2020-01-31 10:30:36 -08:00
2020-02-07 14:48:35 -05:00
2020-03-06 11:06:15 +01:00
2020-04-02 12:30:08 -07:00
2020-05-17 09:20:00 -06:00
2020-04-03 11:35:57 -06:00
2020-04-03 11:35:57 -06:00
2020-04-30 07:57:46 -07:00
2020-03-05 21:00:40 -05:00
2019-06-24 09:16:47 +10:00
2020-03-24 13:27:16 +01:00
2020-03-18 13:03:38 -07:00
2020-03-05 21:00:40 -05:00
2019-05-21 10:50:45 +02:00
2019-07-16 22:52:37 -04:00
2020-01-09 08:16:12 -07:00
2020-04-06 10:38:59 -04:00
2020-03-13 21:08:17 -04:00
2019-05-30 11:26:32 -07:00
2020-03-12 17:33:11 -07:00
2020-04-02 12:30:08 -07:00
2020-04-02 09:35:28 -07:00
2020-04-27 10:37:14 -04:00
2019-05-30 11:29:53 -07:00
2020-01-04 13:55:09 -08:00
2019-09-06 21:28:49 +02:00
2020-04-03 00:09:59 +11:00
2020-01-23 10:15:28 -08:00
2019-11-15 14:38:29 +01:00
2020-04-10 15:36:22 -07:00
2020-05-07 09:45:07 -06:00
2019-12-08 14:37:36 +01:00
2020-01-20 17:03:54 -07:00
2019-10-03 14:21:35 -07:00
2020-04-28 14:37:40 -07:00
2019-05-14 09:47:50 -07:00
2020-01-14 12:20:53 +01:00
2020-04-07 10:43:40 -07:00
2019-12-08 19:10:50 -05:00
2020-03-16 15:53:47 -04:00