]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop queue-6.0/nfsd-move-from-strlcpy-with-unused-retval-to-strscpy.patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Oct 2022 07:15:12 +0000 (09:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Oct 2022 07:15:12 +0000 (09:15 +0200)
not needed.

queue-6.0/nfsd-move-from-strlcpy-with-unused-retval-to-strscpy.patch [deleted file]
queue-6.0/series

diff --git a/queue-6.0/nfsd-move-from-strlcpy-with-unused-retval-to-strscpy.patch b/queue-6.0/nfsd-move-from-strlcpy-with-unused-retval-to-strscpy.patch
deleted file mode 100644 (file)
index 797b03f..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-From 4908d8d5ca67c5281fd01a8e89c1e4eaa7fa7109 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Thu, 18 Aug 2022 23:01:14 +0200
-Subject: NFSD: move from strlcpy with unused retval to strscpy
-
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-
-[ Upstream commit 72f78ae00a8e5d7abe13abac8305a300f6afd74b ]
-
-Follow the advice of the below link and prefer 'strscpy' in this
-subsystem. Conversion is 1:1 because the return value is not used.
-Generated by a coccinelle script.
-
-Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
-Stable-dep-of: fd1ef88049de ("nfsd: Fix a memory leak in an error handling path")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- fs/nfsd/nfs4idmap.c | 8 ++++----
- fs/nfsd/nfs4proc.c  | 2 +-
- fs/nfsd/nfssvc.c    | 2 +-
- 3 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c
-index f92161ce1f97..e70a1a2999b7 100644
---- a/fs/nfsd/nfs4idmap.c
-+++ b/fs/nfsd/nfs4idmap.c
-@@ -82,8 +82,8 @@ ent_init(struct cache_head *cnew, struct cache_head *citm)
-       new->id = itm->id;
-       new->type = itm->type;
--      strlcpy(new->name, itm->name, sizeof(new->name));
--      strlcpy(new->authname, itm->authname, sizeof(new->authname));
-+      strscpy(new->name, itm->name, sizeof(new->name));
-+      strscpy(new->authname, itm->authname, sizeof(new->authname));
- }
- static void
-@@ -548,7 +548,7 @@ idmap_name_to_id(struct svc_rqst *rqstp, int type, const char *name, u32 namelen
-               return nfserr_badowner;
-       memcpy(key.name, name, namelen);
-       key.name[namelen] = '\0';
--      strlcpy(key.authname, rqst_authname(rqstp), sizeof(key.authname));
-+      strscpy(key.authname, rqst_authname(rqstp), sizeof(key.authname));
-       ret = idmap_lookup(rqstp, nametoid_lookup, &key, nn->nametoid_cache, &item);
-       if (ret == -ENOENT)
-               return nfserr_badowner;
-@@ -584,7 +584,7 @@ static __be32 idmap_id_to_name(struct xdr_stream *xdr,
-       int ret;
-       struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
--      strlcpy(key.authname, rqst_authname(rqstp), sizeof(key.authname));
-+      strscpy(key.authname, rqst_authname(rqstp), sizeof(key.authname));
-       ret = idmap_lookup(rqstp, idtoname_lookup, &key, nn->idtoname_cache, &item);
-       if (ret == -ENOENT)
-               return encode_ascii_id(xdr, id);
-diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
-index a72ab97f77ef..0437210b9898 100644
---- a/fs/nfsd/nfs4proc.c
-+++ b/fs/nfsd/nfs4proc.c
-@@ -1343,7 +1343,7 @@ static __be32 nfsd4_ssc_setup_dul(struct nfsd_net *nn, char *ipaddr,
-               return 0;
-       }
-       if (work) {
--              strlcpy(work->nsui_ipaddr, ipaddr, sizeof(work->nsui_ipaddr) - 1);
-+              strscpy(work->nsui_ipaddr, ipaddr, sizeof(work->nsui_ipaddr) - 1);
-               refcount_set(&work->nsui_refcnt, 2);
-               work->nsui_busy = true;
-               list_add_tail(&work->nsui_list, &nn->nfsd_ssc_mount_list);
-diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
-index 4bb5baa17040..bfbd9f672f59 100644
---- a/fs/nfsd/nfssvc.c
-+++ b/fs/nfsd/nfssvc.c
-@@ -799,7 +799,7 @@ nfsd_svc(int nrservs, struct net *net, const struct cred *cred)
-       if (nrservs == 0 && nn->nfsd_serv == NULL)
-               goto out;
--      strlcpy(nn->nfsd_name, utsname()->nodename,
-+      strscpy(nn->nfsd_name, utsname()->nodename,
-               sizeof(nn->nfsd_name));
-       error = nfsd_create_serv(net);
--- 
-2.35.1
-
index 7a9ff2273c1f843738e08c02c6f81036a188772d..52d88e5dfab42820640d26486e0ab68d35c63abd 100644 (file)
@@ -218,7 +218,6 @@ acpi-pcc-release-resources-on-address-space-setup-fa.patch
 acpi-pcc-replace-wait_for_completion.patch
 acpi-pcc-fix-tx-acknowledge-in-the-pcc-address-space.patch
 objtool-preserve-special-st_shndx-indexes-in-elf_upd.patch
-nfsd-move-from-strlcpy-with-unused-retval-to-strscpy.patch
 nfsd-fix-a-memory-leak-in-an-error-handling-path.patch
 sunrpc-fix-svcxdr_init_decode-s-end-of-buffer-calcul.patch
 sunrpc-fix-svcxdr_init_encode-s-buflen-calculation.patch