public inbox for [email protected]
 help / color / mirror / Atom feed
* [RFC 0/1] io_uring: use valid mm in io_req_work_grab_env() in SQPOLL mode
@ 2020-06-19 23:57 Bijan Mottahedeh
  2020-06-19 23:57 ` [RFC 1/1] " Bijan Mottahedeh
  2020-06-20 22:23 ` [RFC 0/1] " Jens Axboe
  0 siblings, 2 replies; 6+ messages in thread
From: Bijan Mottahedeh @ 2020-06-19 23:57 UTC (permalink / raw)
  To: axboe; +Cc: io-uring

The liburing read-write test crashes with the strack trace below.

The problem is NULL current->mm dereference in io_req_work_grab_env().

Sending this as RFC since I'm not sure about any personality implications
of unconditionally using sqo_mm, and the proper way of failing the
request if no valid mm is found.

[  227.308192] BUG: kernel NULL pointer dereference, address: 0000000000000060
[  227.310320] #PF: supervisor write access in kernel mode
[  227.311789] #PF: error_code(0x0002) - not-present page
[  227.313170] PGD 8000000f951e7067 P4D 8000000f951e7067 PUD f9768d067 PMD 0
[  227.314918] Oops: 0002 [#1] SMP DEBUG_PAGEALLOC PTI
[  227.316094] CPU: 4 PID: 6209 Comm: io_uring-sq Not tainted 5.8.0-rc1-next-203
[  227.318050] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-4
[  227.319964] RIP: 0010:__io_queue_sqe+0x503/0x790
[  227.320706] Code: 68 00 00 00 01 49 83 be c8 00 00 00 00 75 2d 42 f6 04 bd 60
[  227.323688] RSP: 0018:ffffc90001297db8 EFLAGS: 00010202
[  227.324520] RAX: ffff888f9aa90040 RBX: ffff888f98dc8af8 RCX: 0000000000000000
[  227.325644] RDX: 0000000000000000 RSI: 0000000000001000 RDI: ffff888f98dc8b28
[  227.326767] RBP: ffffc90001297e38 R08: ffffc90001297c18 R09: 0000000000000001
[  227.327929] R10: 00000000ffffffeb R11: ffff888facb3b800 R12: 0000000000000000
[  227.329042] R13: ffff888facb3b800 R14: ffff888f98dc8a40 R15: 0000000000000001
[  227.330155] FS:  0000000000000000(0000) GS:ffff888ff0e00000(0000) knlGS:00000
[  227.331419] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  227.332338] CR2: 0000000000000060 CR3: 0000000f97bbc002 CR4: 0000000000160ee0
[  227.333449] Call Trace:
[  227.333864]  ? kvm_sched_clock_read+0xd/0x20
[  227.334537]  ? task_work_run+0x61/0x80
[  227.335151]  io_async_buf_retry+0x3b/0x50
[  227.335760]  task_work_run+0x6a/0x80
[  227.336356]  io_sq_thread+0x14e/0x320


Bijan Mottahedeh (1):
  io_uring: use valid mm in io_req_work_grab_env() in SQPOLL mode

 fs/io_uring.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-06-22 20:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-19 23:57 [RFC 0/1] io_uring: use valid mm in io_req_work_grab_env() in SQPOLL mode Bijan Mottahedeh
2020-06-19 23:57 ` [RFC 1/1] " Bijan Mottahedeh
2020-06-20  9:59   ` Pavel Begunkov
2020-06-20 14:22     ` Jens Axboe
2020-06-22 20:48       ` Bijan Mottahedeh
2020-06-20 22:23 ` [RFC 0/1] " Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox