linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: zhengbin <zhengbin13@huawei.com>,
	bvanassche@acm.org, jejb@linux.ibm.com,
	martin.petersen@oracle.com, ming.lei@redhat.com,
	linux-block@vger.kernel.org
Cc: houtao1@huawei.com
Subject: Re: [PATCH] blk-mq: move cancel of requeue_work to the front of blk_exit_queue
Date: Mon, 12 Aug 2019 08:14:28 -0600	[thread overview]
Message-ID: <4ba4e1fd-99e6-ac8f-9c48-fc51b9d1e234@kernel.dk> (raw)
In-Reply-To: <1565613415-24807-1-git-send-email-zhengbin13@huawei.com>

On 8/12/19 5:36 AM, zhengbin wrote:
> blk_exit_queue will free elevator_data, while blk_mq_requeue_work
> will access it. Move cancel of requeue_work to the front of
> blk_exit_queue to avoid use-after-free.
> 
> blk_exit_queue                blk_mq_requeue_work
>    __elevator_exit               blk_mq_run_hw_queues
>      blk_mq_exit_sched             blk_mq_run_hw_queue
>        dd_exit_queue                 blk_mq_hctx_has_pending
>          kfree(elevator_data)          blk_mq_sched_has_work
>                                          dd_has_work

Applied, thanks.

-- 
Jens Axboe


      parent reply	other threads:[~2019-08-12 14:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-12 12:36 [PATCH] blk-mq: move cancel of requeue_work to the front of blk_exit_queue zhengbin
2019-08-12 13:00 ` Ming Lei
2019-08-12 14:14 ` 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 \
    --in-reply-to=4ba4e1fd-99e6-ac8f-9c48-fc51b9d1e234@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=houtao1@huawei.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-block@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=ming.lei@redhat.com \
    --cc=zhengbin13@huawei.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).