All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rahul Rameshbabu <rrameshbabu@nvidia.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Saeed Mahameed <saeedm@nvidia.com>,
	 Leon Romanovsky <leon@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	 Eric Dumazet <edumazet@google.com>,
	 Jakub Kicinski <kuba@kernel.org>,
	 Paolo Abeni <pabeni@redhat.com>,
	 Dragos Tatulea <dtatulea@nvidia.com>,
	netdev@vger.kernel.org,  linux-rdma@vger.kernel.org,
	kernel-janitors@vger.kernel.org, Simon Horman <horms@kernel.org>
Subject: Re: [PATCH net] net/mlx5e: Fix snprintf return check
Date: Mon, 27 Nov 2023 10:46:17 -0800	[thread overview]
Message-ID: <877cm3826e.fsf@nvidia.com> (raw)
In-Reply-To: <d17868ea-cef9-4f8c-a318-9f98b8341f5b@moroto.mountain> (Dan Carpenter's message of "Mon, 27 Nov 2023 16:00:53 +0300")

On Mon, 27 Nov, 2023 16:00:53 +0300 Dan Carpenter <dan.carpenter@linaro.org> wrote:
> This code prints a string and then if there wasn't enough space for the
> whole string, then it prints a slightly shorter string.  However, the
> test for overflow should have been >= instead of == because snprintf()
> returns the number of bytes which *would* have been printed if there
> were enough space.
>
> Fixes: 41e63c2baa11 ("net/mlx5e: Check return value of snprintf writing to fw_version buffer")
> Fixes: 1b2bd0c0264f ("net/mlx5e: Check return value of snprintf writing to fw_version buffer for representors")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---

I have already sent out patches targeting net for this on the mailing
list. That said, thanks for the follow-up.

  * https://lore.kernel.org/netdev/20231121230022.89102-1-rrameshbabu@nvidia.com/
  * https://lore.kernel.org/netdev/20231121230022.89102-2-rrameshbabu@nvidia.com/

These have been reviewed by Simon Horman.

--
Thanks,

Rahul Rameshbabu

  reply	other threads:[~2023-11-27 18:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-27 13:00 [PATCH net] net/mlx5e: Fix snprintf return check Dan Carpenter
2023-11-27 18:46 ` Rahul Rameshbabu [this message]
2023-11-28  6:06   ` Dan Carpenter

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=877cm3826e.fsf@nvidia.com \
    --to=rrameshbabu@nvidia.com \
    --cc=dan.carpenter@linaro.org \
    --cc=davem@davemloft.net \
    --cc=dtatulea@nvidia.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeedm@nvidia.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.