From: Uday Shankar <ushankar@purestorage.com>
To: Ming Lei <ming.lei@redhat.com>, Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org
Subject: Re: [PATCH] ublk: decouple hctx and ublk server threads
Date: Thu, 3 Oct 2024 17:40:57 -0600 [thread overview]
Message-ID: <Zv8riaj2HL7S9e/b@dev-ushankar.dev.purestorage.com> (raw)
In-Reply-To: <20241002224437.3088981-1-ushankar@purestorage.com>
On Wed, Oct 02, 2024 at 04:44:37PM -0600, Uday Shankar wrote:
> @@ -1036,9 +1028,13 @@ static inline void __ublk_complete_rq(struct request *req)
> else
> __blk_mq_end_request(req, BLK_STS_OK);
>
> - return;
> + goto put_task;
> exit:
> blk_mq_end_request(req, res);
> +put_task:
> + WARN_ON_ONCE(!data->task);
> + put_task_struct(data->task);
> + data->task = NULL;
> }
I suppose this is a bug, since the request could be reused once we call
blk_mq_end_request, so we need to drop the task reference before that
happens. Will fix this in v2, along with any other comments I receive on
this.
next prev parent reply other threads:[~2024-10-03 23:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-02 22:44 [PATCH] ublk: decouple hctx and ublk server threads Uday Shankar
2024-10-03 23:40 ` Uday Shankar [this message]
2024-10-05 21:24 ` kernel test robot
2024-10-06 9:20 ` Ming Lei
2024-10-07 19:50 ` Uday Shankar
2024-10-08 1:47 ` Ming Lei
2024-10-08 2:11 ` Ming Lei
2024-10-09 21:11 ` Uday Shankar
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=Zv8riaj2HL7S9e/b@dev-ushankar.dev.purestorage.com \
--to=ushankar@purestorage.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).