mm-damon-sysfs-schemes-use-strscpy-to-instead-of-strncpy.patch removed from -mm tree
The quilt patch titled
Subject: mm/damon/sysfs-schemes: use strscpy() to instead of strncpy()
has been removed from the -mm tree. Its filename was
mm-damon-sysfs-schemes-use-strscpy-to-instead-of-strncpy.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Xu Panda <[email protected]>
Subject: mm/damon/sysfs-schemes: use strscpy() to instead of strncpy()
Date: Mon, 9 Jan 2023 19:46:55 +0800 (CST)
The implementation of strscpy() is more robust and safer. That's now the recommended way to copy NUL-terminated strings.
Signed-off-by Xu Panda <[email protected]>
Signed-off-by Yang Yang <[email protected]>
Reviewed-by SeongJae Park <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
mm/damon/sysfs-schemes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
mm/damon/sysfs-schemes.c renamed from mm/damon/sysfs-schemes.c~mm-damon-sysfs-schemes-use-strscpy-to-instead-of-strncpy +1 -2
@@ -353,8 +353,7 @@ static ssize_t memcg_path_store(struct kif (!path)return -ENOMEM ; -strncpy (path, buf, count); - path[count] ='\0' ; +strscpy (path, buf, count +1 ); filter->memcg_path = path;return count; }
_
Patches currently in -mm which might be from [email protected] are