From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C7C706EB72; Mon, 8 Apr 2024 13:53:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712584427; cv=none; b=WiBerVU2yAWHig4hBdfJKRrrInGrFX4tDM+7qwPZmvpPVEwNY4H7oAD2fJ4xX3HLYGZJeQigNMd3NWhB2d6nZU6sidEpGQAmtdvWwVwsGVB6J9+eb5ntWTyQQMzDs0sXDTStIRjLvZaXWfIV/uwRfXDHxjxEBwpBvpajqjX47bY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712584427; c=relaxed/simple; bh=ID5uSg671lnaQFZpMB40f5yCZV148vCgOWzFiJYWJ7M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pMKzQI37TSqtQmGXrKsIup4Y2pj6RD87WPpq4gW49rL9ZaLqJXXqwpOS+nFZfkNvfHE3tPQIdsWD6AVvluRXNpLODrwVWvtzo6IV5pq+MRZVk0sJD8zlk+e4thbsUabwtTIcx3AqUP/Qe3oq7sET55N20I0r4L0mYTFczAPkVII= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=OaN3wVFv; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="OaN3wVFv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4FA94C433F1; Mon, 8 Apr 2024 13:53:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712584427; bh=ID5uSg671lnaQFZpMB40f5yCZV148vCgOWzFiJYWJ7M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OaN3wVFv6wdZaD9q4nVMHCAvWWb8iQ3UoZabRw/f6tqRRoa6nnxEf5aetgb2QrQ+l zO4bUn4iwmgPIVI5m091IxHCNSGH6k7TgDHVKE1eGVz8+OKFZuQurlPffky0lsGA9P CA6TSaBSf5qf2UU5ggpX8fnzItx2Q1s2qWApTT1o= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Wolfram Sang , Chuck Lever Subject: [PATCH 5.15 417/690] lockd: move from strlcpy with unused retval to strscpy Date: Mon, 8 Apr 2024 14:54:43 +0200 Message-ID: <20240408125414.716572281@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240408125359.506372836@linuxfoundation.org> References: <20240408125359.506372836@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Wolfram Sang [ Upstream commit 97f8e62572555f8ad578d7b1739ba64d5d2cac0f ] 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 Signed-off-by: Chuck Lever --- fs/lockd/host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/lockd/host.c b/fs/lockd/host.c index f802223e71abe..cdc8e12cdac44 100644 --- a/fs/lockd/host.c +++ b/fs/lockd/host.c @@ -164,7 +164,7 @@ static struct nlm_host *nlm_alloc_host(struct nlm_lookup_host_info *ni, host->h_addrbuf = nsm->sm_addrbuf; host->net = ni->net; host->h_cred = get_cred(ni->cred); - strlcpy(host->nodename, utsname()->nodename, sizeof(host->nodename)); + strscpy(host->nodename, utsname()->nodename, sizeof(host->nodename)); out: return host; -- 2.43.0