netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Nick Child <nnac123@linux.ibm.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net 1/2] net: Catch invalid index in XPS mapping
Date: Mon, 20 Mar 2023 21:52:29 -0700	[thread overview]
Message-ID: <20230320215229.53b7dfa7@kernel.org> (raw)
In-Reply-To: <20230317181941.86151-1-nnac123@linux.ibm.com>

On Fri, 17 Mar 2023 13:19:40 -0500 Nick Child wrote:
> +	if (index >= dev->num_tx_queues)
> +		return -EINVAL;

WARN_ON_ONCE()? On a quick grep virtio does not check return value 
for example. Others may assume this never fails and not print any
warning, and users will have "fun time" figuring out why their machine
fell of the network / where is the probe error coming from..

Also seems like net-next material? Why do we consider this a fix?
It's defensive / debug check, ain't no bug to assume callers are sane..

      parent reply	other threads:[~2023-03-21  4:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-17 18:19 [PATCH net 1/2] net: Catch invalid index in XPS mapping Nick Child
2023-03-17 18:19 ` [PATCH net 2/2] netdev: Enforce index cap in netdev_get_tx_queue Nick Child
2023-03-17 18:45   ` Piotr Raczynski
2023-03-17 19:01     ` Nick Child
2023-03-21  4:49   ` Jakub Kicinski
2023-03-17 18:37 ` [PATCH net 1/2] net: Catch invalid index in XPS mapping Piotr Raczynski
2023-03-21  4:52 ` 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=20230320215229.53b7dfa7@kernel.org \
    --to=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nnac123@linux.ibm.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).