Netdev List
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Michal Schmidt <mschmidt@redhat.com>
Cc: netdev@vger.kernel.org, Manish Chopra <manishc@marvell.com>,
	Ariel Elior <aelior@marvell.com>, Alok Prasad <palok@marvell.com>
Subject: Re: [PATCH net] qede: avoid uninitialized entries in coal_entry array
Date: Mon, 27 Feb 2023 10:51:49 -0800	[thread overview]
Message-ID: <20230227105144.06f07b0d@kicinski-fedora-PC1C0HJN> (raw)
In-Reply-To: <20230224004145.91709-1-mschmidt@redhat.com>

On Fri, 24 Feb 2023 01:41:45 +0100 Michal Schmidt wrote:
> Even after commit 908d4bb7c54c ("qede: fix interrupt coalescing
> configuration"), some entries of the coal_entry array may theoretically
> be used uninitialized:
> 
>  1. qede_alloc_fp_array() allocates QEDE_MAX_RSS_CNT entries for
>     coal_entry. The initial allocation uses kcalloc, so everything is
>     initialized.
>  2. The user sets a small number of queues (ethtool -L).
>     coal_entry is reallocated for the actual small number of queues.
>  3. The user sets a bigger number of queues.
>     coal_entry is reallocated bigger. The added entries are not
>     necessarily initialized.
> 
> In practice, the reallocations will actually keep using the originally
> allocated region of memory, but we should not rely on it.
> 
> The reallocation is unnecessary. coal_entry can always have
> QEDE_MAX_RSS_CNT entries.
> 
> Fixes: 908d4bb7c54c ("qede: fix interrupt coalescing configuration")
> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>

Applied, thanks!

      parent reply	other threads:[~2023-02-27 18:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-24  0:41 [PATCH net] qede: avoid uninitialized entries in coal_entry array Michal Schmidt
2023-02-24  7:25 ` [EXT] " Manish Chopra
2023-02-24  8:05   ` Michal Schmidt
2023-02-24  8:34     ` Manish Chopra
2023-02-27 18:51 ` Jakub Kicinski [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=20230227105144.06f07b0d@kicinski-fedora-PC1C0HJN \
    --to=kuba@kernel.org \
    --cc=aelior@marvell.com \
    --cc=manishc@marvell.com \
    --cc=mschmidt@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=palok@marvell.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