All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Yu Kuai <yukuai1@huaweicloud.com>,
	Pradeep P V K <quic_pragalla@quicinc.com>,
	axboe@kernel.dk, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org, "yukuai (C)" <yukuai3@huawei.com>
Subject: Re: [PATCH V1] block: Fix null pointer dereference issue on struct io_cq
Date: Wed, 17 May 2023 18:31:56 +0900	[thread overview]
Message-ID: <344bfde9-5f7e-80a2-038f-3bfc387ea678@kernel.org> (raw)
In-Reply-To: <ZGScoCeOILHpc8c1@infradead.org>

On 5/17/23 18:21, Christoph Hellwig wrote:
> On Wed, May 17, 2023 at 06:20:19PM +0900, Damien Le Moal wrote:
>> twice for the same icq. The missing rcu lock in ioc_exit_icqs() already was in
>> itself a bug, and the missing flag check is another.
> 
> spinlocks imply a rcu critical section, no need to duplicate it.

Right. And I misread the code. As Yu said, given that ioc_exit_icqs() iterates
the list of icqs under ioc->lock and the ioc is removed from that list under the
same lock, ioc_exit_icqs() should never see an icq that went through
ioc_destroy_icq()...
Very weird.


-- 
Damien Le Moal
Western Digital Research


  reply	other threads:[~2023-05-17  9:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-17  8:44 [PATCH V1] block: Fix null pointer dereference issue on struct io_cq Pradeep P V K
2023-05-17  8:55 ` Chaitanya Kulkarni
2023-05-17  8:58 ` Yu Kuai
2023-05-17  9:20   ` Damien Le Moal
2023-05-17  9:21     ` Christoph Hellwig
2023-05-17  9:31       ` Damien Le Moal [this message]
2023-05-18  9:25         ` Pradeep Pragallapati (QUIC)
2023-05-18 12:16   ` Yu Kuai
2023-05-18 12:44     ` Yu Kuai
2023-05-22  6:19       ` Pradeep Pragallapati
2023-05-30 13:15         ` Pradeep Pragallapati
2023-05-30 13:24           ` Yu Kuai

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=344bfde9-5f7e-80a2-038f-3bfc387ea678@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=hch@infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_pragalla@quicinc.com \
    --cc=yukuai1@huaweicloud.com \
    --cc=yukuai3@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.