All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,oberpar@linux.ibm.com,brads@mainlining.org,hrushirajg23@gmail.com,akpm@linux-foundation.org
Subject: [merged mm-nonmm-stable] gcov-use-strscpy-instead-of-strcpy-in-init_node.patch removed from -mm tree
Date: Tue, 06 Oct 2026 19:04:29 -0700	[thread overview]
Message-ID: <20261007020429.70DA71F0089C@smtp.kernel.org> (raw)


The quilt patch titled
     Subject: gcov: use strscpy() instead of strcpy() in init_node()
has been removed from the -mm tree.  Its filename was
     gcov-use-strscpy-instead-of-strcpy-in-init_node.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Hrushiraj Gandhi <hrushirajg23@gmail.com>
Subject: gcov: use strscpy() instead of strcpy() in init_node()
Date: Mon, 31 Aug 2026 20:19:53 +0530

node->name is a flexible array member sized to exactly strlen(name) + 1
bytes at allocation time in new_node(), so this copy can never actually
overflow.  Still, prefer the bounded strscpy() over strcpy() on general
principle; pass the same strlen(name) + 1 bound the allocation used, since
sizeof() cannot be applied to a flexible array member.

No functional change.

Link: https://lore.kernel.org/20260831144953.324441-1-hrushirajg23@gmail.com
Signed-off-by: Hrushiraj Gandhi <hrushirajg23@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Bradley Morgan <brads@mainlining.org>
Cc: Peter Oberparleiter <oberpar@linux.ibm.com>
---

 kernel/gcov/fs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/kernel/gcov/fs.c~gcov-use-strscpy-instead-of-strcpy-in-init_node
+++ a/kernel/gcov/fs.c
@@ -529,7 +529,7 @@ static void init_node(struct gcov_node *
 	}
 	node->parent = parent;
 	if (name)
-		strcpy(node->name, name);
+		strscpy(node->name, name, strlen(name) + 1);
 }
 
 /*
_

Patches currently in -mm which might be from hrushirajg23@gmail.com are



                 reply	other threads:[~2026-10-07  2:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261007020429.70DA71F0089C@smtp.kernel.org \
    --to=akpm@linux-foundation.org \
    --cc=brads@mainlining.org \
    --cc=hrushirajg23@gmail.com \
    --cc=mm-commits@vger.kernel.org \
    --cc=oberpar@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 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.