Pavel Begunkov
b8ce1b9d25
io_uring: don't submit half-prepared drain request
...
[ 3784.910888] BUG: kernel NULL pointer dereference, address: 0000000000000020
[ 3784.910904] RIP: 0010:__io_file_supports_nowait+0x5/0xc0
[ 3784.910926] Call Trace:
[ 3784.910928] ? io_read+0x17c/0x480
[ 3784.910945] io_issue_sqe+0xcb/0x1840
[ 3784.910953] __io_queue_sqe+0x44/0x300
[ 3784.910959] io_req_task_submit+0x27/0x70
[ 3784.910962] tctx_task_work+0xeb/0x1d0
[ 3784.910966] task_work_run+0x61/0xa0
[ 3784.910968] io_run_task_work_sig+0x53/0xa0
[ 3784.910975] __x64_sys_io_uring_enter+0x22/0x30
[ 3784.910977] do_syscall_64+0x3d/0x90
[ 3784.910981] entry_SYSCALL_64_after_hwframe+0x44/0xae
io_drain_req() goes before checks for REQ_F_FAIL, which protect us from
submitting under-prepared request (e.g. failed in io_init_req(). Fail
such drained requests as well.
Fixes: a8295b982c46d ("io_uring: fix failed linkchain code logic")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/e411eb9924d47a131b1e200b26b675df0c2b7627.1630415423.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2021-08-31 11:45:31 -06:00
..
2021-05-07 11:18:52 -07:00
2021-06-29 10:53:48 -07:00
2021-06-29 10:53:48 -07:00
2021-07-21 15:11:22 +01:00
2021-03-24 14:14:27 -04:00
2021-03-30 16:54:49 -07:00
2021-06-29 10:53:48 -07:00
2021-08-18 12:06:42 -07:00
2021-04-23 10:14:32 +01:00
2021-08-04 19:20:29 +02:00
2021-08-12 11:29:58 -05:00
2021-04-23 14:42:39 -07:00
2021-08-09 16:56:00 +02:00
2021-01-05 23:02:47 -05:00
2021-06-05 00:52:52 -07:00
2021-06-14 09:07:45 +02:00
2021-06-11 12:44:47 -05:00
2021-06-29 10:53:48 -07:00
2021-04-12 15:04:29 +02:00
2021-06-08 00:41:24 +08:00
2021-07-06 11:06:04 -07:00
2020-12-09 09:39:38 -05:00
2021-07-16 12:36:51 +02:00
2021-08-06 13:00:49 -04:00
2021-07-06 22:05:06 -07:00
2021-06-29 10:53:48 -07:00
2021-04-23 10:14:32 +01:00
2021-08-11 12:04:43 -07:00
2021-06-29 20:23:08 -07:00
2021-07-15 10:13:49 -07:00
2021-07-01 11:06:06 -07:00
2021-05-02 09:14:01 -07:00
2021-06-29 10:53:48 -07:00
2021-07-23 17:43:28 -07:00
2021-07-15 09:58:06 -07:00
2021-06-17 17:11:42 +02:00
2021-07-08 08:37:31 -04:00
2021-05-04 18:08:40 -07:00
2021-07-02 14:25:17 -07:00
2021-07-05 13:51:41 -07:00
2021-07-06 20:14:44 -04:00
2021-06-29 10:53:48 -07:00
2021-06-21 21:24:07 +01:00
2021-07-09 09:43:57 -07:00
2021-07-06 20:14:41 -04:00
2021-07-09 12:05:33 -07:00
2021-07-02 12:08:10 -07:00
2021-08-09 15:45:02 -05:00
2021-07-03 11:30:04 -07:00
2021-07-30 10:14:39 -07:00
2021-06-29 10:53:48 -07:00
2021-03-12 22:15:22 -05:00
2021-06-28 08:40:08 -04:00
2021-08-10 10:21:30 +02:00
2021-07-03 11:41:14 -07:00
2021-06-30 12:21:16 -07:00
2021-06-22 10:40:52 +02:00
2021-06-29 10:53:48 -07:00
2021-07-16 12:36:51 +02:00
2021-06-29 10:53:46 -07:00
2021-01-12 14:26:31 +01:00
2021-06-29 10:53:48 -07:00
2021-03-23 14:08:18 -04:00
2021-06-22 09:21:39 +02:00
2021-07-01 12:06:39 -07:00
2021-06-29 10:53:48 -07:00
2021-05-02 00:43:35 +09:00
2021-06-23 14:36:52 +02:00
2021-04-22 17:31:32 +10:00
2021-08-01 12:07:23 -07:00
2021-07-16 13:45:18 +09:00
2021-04-30 11:20:39 -07:00
2021-01-15 12:17:25 -05:00
2021-01-24 14:27:20 +01:00
2021-01-24 14:27:20 +01:00
2021-06-29 10:53:50 -07:00
2021-06-29 17:29:11 -07:00
2021-06-29 17:29:11 -07:00
2021-06-29 10:53:50 -07:00
2021-03-13 11:27:30 -08:00
2021-07-30 11:08:12 -07:00
2021-06-29 10:53:48 -07:00
2021-01-06 08:42:51 -05:00
2021-07-03 11:41:14 -07:00
2021-05-18 20:15:58 -04:00
2021-08-11 12:04:43 -07:00
2021-04-15 22:36:45 -04:00
2021-04-09 14:54:23 -07:00
2020-11-15 09:49:10 -05:00
2021-05-06 19:24:13 -07:00
2021-07-02 12:08:10 -07:00
2021-07-12 11:09:13 -05:00
2021-04-07 13:56:43 -04:00
2021-05-03 11:05:28 -07:00
2021-07-14 09:19:06 -07:00
2021-04-30 11:20:35 -07:00
2021-07-23 17:43:28 -07:00
2021-01-24 14:27:19 +01:00
2021-05-05 11:27:20 -07:00
2021-07-21 06:39:20 -10:00
2021-08-31 11:45:31 -06:00
2021-08-31 11:45:31 -06:00
2021-08-29 07:55:55 -06:00
2021-04-12 15:04:23 +02:00
2021-06-30 20:47:26 -07:00
2021-07-25 22:33:03 -07:00
2021-04-07 13:56:43 -04:00
2021-06-29 10:53:48 -07:00
2021-05-05 13:44:19 -07:00
2021-07-25 22:33:03 -07:00
2021-01-24 14:29:34 +01:00
2021-03-11 07:47:48 -07:00
2021-07-03 11:41:14 -07:00
2021-08-21 10:50:22 -07:00
2021-07-03 11:41:14 -07:00
2021-08-18 11:39:46 -07:00
2021-03-08 15:18:43 +01:00
2021-01-24 14:27:20 +01:00
2021-01-24 14:43:45 +01:00
2021-01-25 23:29:36 -05:00
2021-04-17 11:39:49 -07:00
2021-01-24 14:27:19 +01:00
2021-03-16 22:13:10 +01:00
2021-07-19 17:18:48 -07:00
2021-05-18 16:20:54 -05:00
2021-02-21 11:02:48 -08:00
2021-04-17 23:03:50 -04:00
2021-02-13 17:17:53 +01:00
2021-06-01 07:44:32 -06:00
2021-07-23 17:43:28 -07:00
2021-01-24 14:27:18 +01:00
2021-03-23 11:20:26 +01:00