All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sagi Grimberg <sagi@grimberg.me>
To: Christoph Hellwig <hch@lst.de>,
	Chaitanya Kulkarni <chaitanyak@nvidia.com>
Cc: "linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	Keith Busch <kbusch@kernel.org>,
	Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>,
	Hannes Reinecke <hare@suse.de>,
	Yanjun Zhang <zhangyanjun@cestc.cn>
Subject: Re: [PATCH v3] nvme-tcp: fix a possible UAF when failing to allocate an io queue
Date: Wed, 22 Mar 2023 10:18:19 +0200	[thread overview]
Message-ID: <0f1e3763-6445-6b3b-d876-f5fe934f35e0@grimberg.me> (raw)
In-Reply-To: <20230322081539.GA22139@lst.de>

>>> +#ifdef CONFIG_NET_RX_BUSY_POLL
>>> +	queue->sock->sk->sk_ll_usec = 1;
>>> +#endif
>>> +	write_unlock_bh(&queue->sock->sk->sk_callback_lock);
>>> +}
>>> +
>>
>> since its is not in the fast path, is there a particular reason not
>> to use following ?
>>
>> if (IS_ENABLED(CONFIG_NET_RX_BUSY_POLL)
>> 	queue->sock->sk->sk_ll_usec = 1;
> 
> That won't compile, as the sk_ll_usec is not defined without
> CONFIG_NET_RX_BUSY_POLL.

I didn't check with CONFIG_NET_RX_BUSY_POLL=n, so you can
disregard v4 if that's the case.


  reply	other threads:[~2023-03-22  8:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-20 13:33 [PATCH v3] nvme-tcp: fix a possible UAF when failing to allocate an io queue Sagi Grimberg
2023-03-21  5:12 ` Chaitanya Kulkarni
2023-03-22  8:15   ` Christoph Hellwig
2023-03-22  8:18     ` Sagi Grimberg [this message]
2023-03-22  8:20 ` Christoph Hellwig
2023-03-22  8:24   ` Sagi Grimberg
2023-03-22  8:27     ` Christoph Hellwig
2023-03-22 13:06       ` Sagi Grimberg
2023-03-29  6:23 zhangyanjun
2023-03-30  2:27 ` Christoph Hellwig
2023-03-30  2:14 zhangyanjun

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=0f1e3763-6445-6b3b-d876-f5fe934f35e0@grimberg.me \
    --to=sagi@grimberg.me \
    --cc=Chaitanya.Kulkarni@wdc.com \
    --cc=chaitanyak@nvidia.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=zhangyanjun@cestc.cn \
    /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.