Linux-Fsdevel Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Stefano Garzarella <sgarzare@redhat.com>, Jens Axboe <axboe@kernel.dk>
Cc: io-uring@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org
Subject: Re: io_uring: BUG: kernel NULL pointer dereference
Date: Mon, 25 May 2020 17:11:37 +0300	[thread overview]
Message-ID: <9e5fd20b-3427-7608-4504-455fb300c949@gmail.com> (raw)
In-Reply-To: <20200525134552.5dyldwmeks3t6vj6@steredhat>

On 25/05/2020 16:45, Stefano Garzarella wrote:
> On Mon, May 25, 2020 at 12:30:51PM +0200, Stefano Garzarella wrote:
>>
>> I'll try to bisect, but I have some suspicions about:
>> b41e98524e42 io_uring: add per-task callback handler
> 
> I confirm, the bisection ended with this:
> b41e98524e424d104aa7851d54fd65820759875a is the first bad commit
> 
> I'll try to figure out what happened.

Hmm, I'd start with temporary un-union req->task_work.
Could you give it a try?


diff --git a/fs/io_uring.c b/fs/io_uring.c
index e173cea621de..cfab79254d0a 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -645,7 +645,7 @@ struct io_kiocb {

 	struct percpu_ref	*fixed_file_refs;

-	union {
+	// union {
 		/*
 		 * Only commands that never go async can use the below fields,
 		 * obviously. Right now only IORING_OP_POLL_ADD uses them, and
@@ -658,7 +658,7 @@ struct io_kiocb {
 			struct async_poll	*apoll;
 		};
 		struct io_wq_work	work;
-	};
+	// };
 };

 #define IO_PLUG_THRESHOLD		2


-- 
Pavel Begunkov

      parent reply	other threads:[~2020-05-25 14:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-25 10:30 Stefano Garzarella
2020-05-25 13:45 ` Stefano Garzarella
2020-05-25 14:10   ` Jens Axboe
2020-05-25 15:02     ` Stefano Garzarella
2020-05-25 19:07       ` Jens Axboe
2020-05-25 19:21     ` Peter Zijlstra
2020-05-25 19:25       ` Jens Axboe
2020-05-25 14:11   ` Pavel Begunkov [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 \
    --in-reply-to=9e5fd20b-3427-7608-4504-455fb300c949@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sgarzare@redhat.com \
    --subject='Re: io_uring: BUG: kernel NULL pointer dereference' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).