public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Bijan Mottahedeh <[email protected]>
Cc: [email protected]
Subject: Re: [RFC 0/1] io_uring: use valid mm in io_req_work_grab_env() in SQPOLL mode
Date: Sat, 20 Jun 2020 16:23:23 -0600	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 6/19/20 5:57 PM, Bijan Mottahedeh wrote:
> 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

Ah I missed you're running for-next, the next update should work for you,
the io_async_buf_retry() got fixed with the necessary mm grab for SQPOLL
a few days ago:

https://git.kernel.dk/cgit/linux-block/commit/?h=async-buffered.8&id=3ad1d68c04bf9555942b63b5aba31e446fdcf355

-- 
Jens Axboe


      parent reply	other threads:[~2020-06-20 22:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Jens Axboe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox