From nobody Sat Nov 23 18:23:47 2024 Received: from sonic312-20.consmr.mail.sg3.yahoo.com (sonic312-20.consmr.mail.sg3.yahoo.com [106.10.244.210]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 349D7156C6F for ; Mon, 11 Nov 2024 22:41:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=106.10.244.210 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731364874; cv=none; b=ZMRv8rW3OtbF6ozlF0sBrHlKB7En8jrV4B3FTq/gNmS7bBEPZtx5CgUfhzLx3wJ/TT6d049WQrXqlPDXjIlYCLLrerJXRfphAeApYa1LLJfiajuKfZyLdwN3AcO6z+uBVi/G4vUNvgku/b1uacXYAHwJpbZ8f2GB45oLoihfGMw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731364874; c=relaxed/simple; bh=cG7reSJoypxhSF8WZxlnJTDYEnJc2ocW1SAjGk4F16Y=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:References; b=G8UvXbzMNShrSZgr/GcE2G1RuuDgZA3tpIkXahxqX98nv2c8oSLRvsxNoy7AeIuqOO/HeFJjkcTuAxOnAgP3ealjlAUk5q21kAgpLjwovppDUwklkib2Avz0I3xkcRpFP0L05Bm5jFZ2Ftz0M1pqv3ujgFSlhoQ5cLfd6MMCUF4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=myyahoo.com; spf=pass smtp.mailfrom=myyahoo.com; dkim=pass (2048-bit key) header.d=myyahoo.com header.i=@myyahoo.com header.b=oU96+tzD; arc=none smtp.client-ip=106.10.244.210 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=myyahoo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=myyahoo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=myyahoo.com header.i=@myyahoo.com header.b="oU96+tzD" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=myyahoo.com; s=s2048; t=1731364870; bh=VAY3jISqxsGqhWsIMu+XZ8jzanX+gBt2aTfBTDDEbuQ=; h=From:To:Cc:Subject:Date:References:From:Subject:Reply-To; b=oU96+tzDvZBmPze0a8pdoOH0vca79uq0PtLflLkkfiXN3UUo4TsZlHxkqgTz5chVYw8eOiZ/vUHPaM5ShtZFB2ZaPHQNUONkGBsUmeiortxbxDkWrPBGcq1senLqjsdIfAk/gvv1mKFcMhyRWwFHJWgq20iGcSlUBaBqlqZK94Tzy7DHQ+potPTzhSzTt90xwVaK9oEtqAyK9415pz4SrZuDDZR8zLVGXKmsG1o4JFaWsz6nsmKimjE2WzFylrxOPocJzfRxxgOQJBHCneO/OJDzW1VV+RBrb7LWyWDOEBm1nWWx6j6vaQrSLoFH85WeYFdiGAU7w8SpAf6B69UkEA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1731364870; bh=d8guuBnsU1QxFzfemBWMwOEsvyFA1uK7sPmMvD0pB6T=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=AOSGU0R0J3lzD6nCFd3jASvIh+z+q13JawdG/7XpzjA0wylF9ZU9aejNZ8m48/hIyIG+nC5c0wRMKmTsZMZpLUW3bKhv4XLh1kCaCOLsyTNJv3GCct/dd2g9W9OZ8pcRtLJHl90DY9l38uT06gWLAsvQvIYOtrqwUWG5NwSQNK/XMUxmTONdWN6nyTeM3J6adjugf/tNRCEq3AVZHu9a4vNpGhTHuaeX7maMnshHvzBQxEb6d8L3KU5hv95QqIMw8Imfb0TaOc3febEY+tizNZ6cYHhEj/QLClcT6EDLBQWXt45E8nhvZo2jpVWwp1sY80ZrGQA4FiAH7xL74mlZvg== X-YMail-OSG: h6rPJJgVM1k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OLLV.d67.6jfczVARqJMngm7ka4djPno5vl74ORl SAV_eRUjqknaAqEPgryiQLa36GAVfS6NicCrpDt.U5w5OyevKtYvrCl6u83udOPsQf1gsA1aRJVc evk236WmJm0LdqzN_xHWWFFN9g0vSubQLeyKoUXFt1Ru2XxX3B8VQHME- X-Sonic-MF: X-Sonic-ID: 3f86b400-b84b-40d7-bc51-9595ddb8a81e Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.sg3.yahoo.com with HTTP; Mon, 11 Nov 2024 22:41:10 +0000 Received: by hermes--production-sg3-5b7954b588-f8smd (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 7fa1234fe99fc0a71fe48f5ec805f6a6; Mon, 11 Nov 2024 22:10:42 +0000 (UTC) From: Abdul Rahim To: xiubli@redhat.com, idryomov@gmail.com Cc: ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org, Abdul Rahim Subject: [PATCH] Use strscpy() instead of strcpy() Date: Tue, 12 Nov 2024 03:40:37 +0530 Message-ID: <20241111221037.92853-1-abdul.rahim@myyahoo.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable References: <20241111221037.92853-1-abdul.rahim.ref@myyahoo.com> Content-Type: text/plain; charset="utf-8" strcpy() is generally considered unsafe and use of strscpy() is recommended [1] this fixes checkpatch warning: WARNING: Prefer strscpy over strcpy Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy= [1] Signed-off-by: Abdul Rahim --- fs/ceph/export.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ceph/export.c b/fs/ceph/export.c index 44451749c544..0e5b3c7b3756 100644 --- a/fs/ceph/export.c +++ b/fs/ceph/export.c @@ -452,7 +452,7 @@ static int __get_snap_name(struct dentry *parent, char = *name, goto out; if (ceph_snap(inode) =3D=3D CEPH_SNAPDIR) { if (ceph_snap(dir) =3D=3D CEPH_NOSNAP) { - strcpy(name, fsc->mount_options->snapdir_name); + strscpy(name, fsc->mount_options->snapdir_name); err =3D 0; } goto out; --=20 2.43.0