From nobody Tue Jun 25 17:42:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7sc05zQfz5PjY7; Tue, 25 Jun 2024 17:42:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W7sc03HWlz49Q2; Tue, 25 Jun 2024 17:42:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719337360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ziexze2Zw/8IPPwTHxosjHs7mGdWmeqo4aswEx0hKuQ=; b=unEPTKULFd0yFg0UtNyCn+XNdqSYYURmsAntijy2NRI3BfOYuV9fiHeIf+Bm7hMIb/H/wz 67svGtvaiUSXTrxzUGFlCba99r1f3Gx2XJ0X+5n5Kvorx04IWhkegZ5K5MBLcOQhN9THDm NNPunjGoHhLfkZ6DPdCKmW0AaNwyib2HSG5T+deIkiNCuYcT2/BjqmgbwjqA+/bySrsyWx ns/wUsr04I7dd7Xyc+wi/qt30BDI7+09K6A3tph1ZvuUgcQJ+8fcCH2SkGciA4zwtlZ8Yy JXKbX6qZP5jZerr/OSzl4iwFsSTFKGNfa9zJEXYbNu4jkc3TSdqro8URbMFSqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719337360; a=rsa-sha256; cv=none; b=XhFlgbXo0nLN9AcAH+4vy7W3XVPssNdEvY6/Jb+DljegKmg75n839B11obW/HdYbYyAkLg M02WNCt1+f6lbGfEG6rmTZtyVym2qUez6ApN1JYh65ZPEPmR+AgabCI969ZBSuQi9pkxG7 dsxtffhwzjBx4NIOyjbby0GGRrtZTyXOqUAy1KbPPETUuh/rgVyYqqS8AXmKxRWIcumKJl k899N/LzY7IhSz1wkr4VSZjvGTH7Z5aAyS4aNh1urQc8kU+t/O2t6Kpus60q/sKUNP1gQS U06UpyKbWoP85yom1+lDwlGD8FsBQMf6PGNErXujeg5c4EKDLLFF7lj9lulzEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719337360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ziexze2Zw/8IPPwTHxosjHs7mGdWmeqo4aswEx0hKuQ=; b=W18Kwxfeu7lcQN0VszX/LhURuaW0ZJNbfcVgf0M8CR7J1/LMLmhXfJCxo80IDdD1Hq6+JO QUPqGu0wZHz3kVLOZb7Y30EoUKIZ/Dr+XSVVCHjDAOSvX9GKYGXeGO9Lx/8QLH+zDx2/ke GYBeLZ2wKiUjCgDjIKniQaFAtcR5Je+qr9GUxZ5GWB/9XsaThYw+JxepgMV3hw+tbzavm0 2I6ucMdUBAV1I33kF/MdziZDhQN3rw+iFTty7xOTCQCE19BIsioEmewTGg9vsHAjbK/dTo g9inzXWzYBWhM1MOybd5iH0BB9ySkE+XU3wXMSxRxtl4ZyT42oFqUsxZG5U7bA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7sc02vcVz19bf; Tue, 25 Jun 2024 17:42:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45PHgeTs040314; Tue, 25 Jun 2024 17:42:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45PHgeFN040311; Tue, 25 Jun 2024 17:42:40 GMT (envelope-from git) Date: Tue, 25 Jun 2024 17:42:40 GMT Message-Id: <202406251742.45PHgeFN040311@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: f29bdea04776 - main - ext4_ext_tree_init: correct memset initialization List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f29bdea0477625cb3b9de2971e92b67e5bb71178 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=f29bdea0477625cb3b9de2971e92b67e5bb71178 commit f29bdea0477625cb3b9de2971e92b67e5bb71178 Author: Ryan Libby AuthorDate: 2024-06-25 17:41:11 +0000 Commit: Ryan Libby CommitDate: 2024-06-25 17:41:11 +0000 ext4_ext_tree_init: correct memset initialization gcc -Wmemset-elt-size diagnosed this. The code was only initializing 1/4 of the array. However, it was actually harmless, as the only caller had done an M_ZERO allocation anyway. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D45701 --- sys/fs/ext2fs/ext2_extents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/ext2fs/ext2_extents.c b/sys/fs/ext2fs/ext2_extents.c index 3ae1da4fe6b7..146aa48f6743 100644 --- a/sys/fs/ext2fs/ext2_extents.c +++ b/sys/fs/ext2fs/ext2_extents.c @@ -711,7 +711,7 @@ ext4_ext_tree_init(struct inode *ip) ip->i_flag |= IN_E4EXTENTS; - memset(ip->i_data, 0, EXT2_NDADDR + EXT2_NIADDR); + memset(ip->i_data, 0, sizeof(ip->i_data)); ehp = (struct ext4_extent_header *)ip->i_data; ehp->eh_magic = htole16(EXT4_EXT_MAGIC); ehp->eh_max = htole16(ext4_ext_space_root(ip));