Re: [PATCH net-next v12 00/15] net: introduce QUIC infrastructure and core subcomponents

Jakub Kicinski <[email protected]> Tue, 2 Jun 2026 11:18:23 -0700
Newsgroups dev.linux.lists.quic,dev.linux.lists.kernel-tls-handshake,org.kernel.vger.linux-cifs,org.kernel.vger.netdev
Message-ID <[email protected]>
On Tue, 2 Jun 2026 09:12:30 -0400 Xin Long wrote:
> Note: I've run Sashiko on this patchset many times locally over the past
> month and addressed all the real issues it found. I don't see any new real
> issues being reported on:

Coccinelle had a report tho:

The NIPA CI coccicheck run flagged a new Coccinelle warning introduced by
this patch:

  net/quic/crypto.c:1164:13-20: WARNING opportunity for kmemdup

At line 1164 of the newly introduced net/quic/crypto.c, there is a
kmalloc() call immediately followed by a memcpy() into the allocated
buffer.  Coccinelle's memdup checker suggests replacing this two-step
pattern with a single kmemdup() call, which is the preferred kernel idiom.

The fix is straightforward - replacing:

  p = kmalloc(len, gfp);
  if (!p)
      return -ENOMEM;
  memcpy(p, src, len);

with:

  p = kmemdup(src, len, gfp);
  if (!p)
      return -ENOMEM;

Please update the patch to use kmemdup() at that location.