From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE141C54E94 for ; Tue, 24 Jan 2023 21:04:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234579AbjAXVEY (ORCPT ); Tue, 24 Jan 2023 16:04:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233829AbjAXVEW (ORCPT ); Tue, 24 Jan 2023 16:04:22 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D26B50852 for ; Tue, 24 Jan 2023 13:04:21 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2669BB816B0 for ; Tue, 24 Jan 2023 21:04:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD74FC433EF; Tue, 24 Jan 2023 21:04:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1674594258; bh=Dd84bWS3u2NQN14zq3x8dzRgKgIfv0MGuhj0W5WnnoA=; h=Date:To:From:Subject:From; b=njLk4FF4UBmnYr8vaDoxmVcl0CHFEW/NRVyPvijAvfXtpMDsa0jTUHdypDQjJF/rm OL9xmuiFDxjwdycUnuQsq7Pzo9M5HILD70m2DHAwzSiFU32H9UrVGtS/fZYDLg/XN0 ApRI75wP1vpyA2lonhJUd5Q3K8YRFllUE6mg6ctc= Date: Tue, 24 Jan 2023 13:04:18 -0800 To: mm-commits@vger.kernel.org, tytso@mit.edu, jaegeuk@kernel.org, ebiggers@kernel.org, chao@kernel.org, adilger.kernel@dilger.ca, glider@google.com, akpm@linux-foundation.org From: Andrew Morton Subject: + fs-hfsplus-initialize-fsdata-in-hfsplus_file_truncate.patch added to mm-nonmm-unstable branch Message-Id: <20230124210418.BD74FC433EF@smtp.kernel.org> Precedence: bulk Reply-To: linux-kernel@vger.kernel.org List-ID: X-Mailing-List: mm-commits@vger.kernel.org The patch titled Subject: fs: hfsplus: initialize fsdata in hfsplus_file_truncate() has been added to the -mm mm-nonmm-unstable branch. Its filename is fs-hfsplus-initialize-fsdata-in-hfsplus_file_truncate.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/fs-hfsplus-initialize-fsdata-in-hfsplus_file_truncate.patch This patch will later appear in the mm-nonmm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Alexander Potapenko Subject: fs: hfsplus: initialize fsdata in hfsplus_file_truncate() Date: Mon, 21 Nov 2022 12:21:34 +0100 When aops->write_begin() does not initialize fsdata, KMSAN may report an error passing the latter to aops->write_end(). Fix this by unconditionally initializing fsdata. Link: https://lkml.kernel.org/r/20221121112134.407362-5-glider@google.com Signed-off-by: Alexander Potapenko Suggested-by: Eric Biggers Cc: Andreas Dilger Cc: Chao Yu Cc: Jaegeuk Kim Cc: Theodore Ts'o Signed-off-by: Andrew Morton --- fs/hfsplus/extents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/hfsplus/extents.c~fs-hfsplus-initialize-fsdata-in-hfsplus_file_truncate +++ a/fs/hfsplus/extents.c @@ -554,7 +554,7 @@ void hfsplus_file_truncate(struct inode if (inode->i_size > hip->phys_size) { struct address_space *mapping = inode->i_mapping; struct page *page; - void *fsdata; + void *fsdata = NULL; loff_t size = inode->i_size; res = hfsplus_write_begin(NULL, mapping, size, 0, _ Patches currently in -mm which might be from glider@google.com are revert-x86-kmsan-sync-metadata-pages-on-page-fault.patch kmsan-silence-wmissing-prototypes-warnings.patch fs-hfs-initialize-fsdata-in-hfs_file_truncate.patch fs-hfsplus-initialize-fsdata-in-hfsplus_file_truncate.patch