mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Laight <david.laight.linux@gmail.com>
To: Janis Edvarts Lacis <janislacis06@gmail.com>
Cc: pabeni@redhat.com, davem@davemloft.net, edumazet@google.com,
	horms@kernel.org, kuba@kernel.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, liuhangbin@kylinos.cn
Subject: Re: [PATCH net] net: vlan: fix vlan name truncation
Date: Fri, 11 Sep 2026 22:45:13 +0100	[thread overview]
Message-ID: <20260911224513.1fc3f0fc@pumpkin> (raw)
In-Reply-To: <20260911163543.204203-1-janislacis06@gmail.com>

On Fri, 11 Sep 2026 19:35:43 +0300
Janis Edvarts Lacis <janislacis06@gmail.com> wrote:

> On Thu, Sep 10, 2026 at 10:56 AM, Paolo Abeni wrote:
> > I'm sorry, but I don't think we can accept this patch: this change an
> > user-space visible behavior: ...  
> 
> Okay, I see the issue. How about a 'solution' like this: we use scnprintf() 
> instead of snprintf() in two branches that can have the name truncated? From 
> what I see, the only difference between snprintf() and scnprintf() is the 
> return value so there should be no functional change visible to the user. I 
> tested the W=1 build, the warning is gone if scnprintf() is used.

I think that ought to be considered a bug in the compiler options.
There is no real justification for snprintf() and scnprintf() being different
(especially if the result is ignored).

David

      reply	other threads:[~2026-09-11 21:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04 21:00 Janis Edvarts Lacis
2026-09-10  8:15 ` Hangbin Liu
2026-09-10 10:56 ` Paolo Abeni
2026-09-11 16:35   ` Janis Edvarts Lacis
2026-09-11 21:45     ` David Laight [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=20260911224513.1fc3f0fc@pumpkin \
    --to=david.laight.linux@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=janislacis06@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuhangbin@kylinos.cn \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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

all inboxes | Powered by JetHome®