From: Alexander Potapenko <glider@google.com> To: glider@google.com Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, tytso@mit.edu, adilger.kernel@dilger.ca, jaegeuk@kernel.org, chao@kernel.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Eric Biggers <ebiggers@kernel.org> Subject: [PATCH 5/5] fs: hfsplus: initialize fsdata in hfsplus_file_truncate() Date: Mon, 21 Nov 2022 12:21:34 +0100 [thread overview] Message-ID: <20221121112134.407362-5-glider@google.com> (raw) In-Reply-To: <20221121112134.407362-1-glider@google.com> 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. Suggested-by: Eric Biggers <ebiggers@kernel.org> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Alexander Potapenko <glider@google.com> --- fs/hfsplus/extents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/hfsplus/extents.c b/fs/hfsplus/extents.c index 721f779b4ec3e..7a542f3dbe502 100644 --- a/fs/hfsplus/extents.c +++ b/fs/hfsplus/extents.c @@ -554,7 +554,7 @@ void hfsplus_file_truncate(struct inode *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, -- 2.38.1.584.g0f3c55d4c2-goog
WARNING: multiple messages have this Message-ID (diff)
From: Alexander Potapenko via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net> To: glider@google.com Cc: tytso@mit.edu, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Eric Biggers <ebiggers@kernel.org>, adilger.kernel@dilger.ca, linux-fsdevel@vger.kernel.org, jaegeuk@kernel.org, akpm@linux-foundation.org, linux-ext4@vger.kernel.org Subject: [f2fs-dev] [PATCH 5/5] fs: hfsplus: initialize fsdata in hfsplus_file_truncate() Date: Mon, 21 Nov 2022 12:21:34 +0100 [thread overview] Message-ID: <20221121112134.407362-5-glider@google.com> (raw) In-Reply-To: <20221121112134.407362-1-glider@google.com> 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. Suggested-by: Eric Biggers <ebiggers@kernel.org> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Alexander Potapenko <glider@google.com> --- fs/hfsplus/extents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/hfsplus/extents.c b/fs/hfsplus/extents.c index 721f779b4ec3e..7a542f3dbe502 100644 --- a/fs/hfsplus/extents.c +++ b/fs/hfsplus/extents.c @@ -554,7 +554,7 @@ void hfsplus_file_truncate(struct inode *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, -- 2.38.1.584.g0f3c55d4c2-goog _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2022-11-21 11:27 UTC|newest] Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-11-21 11:21 [PATCH 1/5] fs: ext4: initialize fsdata in pagecache_write() Alexander Potapenko 2022-11-21 11:21 ` [f2fs-dev] " Alexander Potapenko via Linux-f2fs-devel 2022-11-21 11:21 ` [PATCH 2/5] fs: affs: initialize fsdata in affs_truncate() Alexander Potapenko 2022-11-21 11:21 ` [f2fs-dev] " Alexander Potapenko via Linux-f2fs-devel 2022-11-21 19:46 ` Eric Biggers 2022-11-21 19:46 ` [f2fs-dev] " Eric Biggers 2022-11-22 8:57 ` Alexander Potapenko via Linux-f2fs-devel 2022-11-22 8:57 ` Alexander Potapenko 2022-11-22 14:56 ` [f2fs-dev] " David Sterba 2022-11-22 14:56 ` David Sterba 2023-01-10 12:27 ` [f2fs-dev] " Alexander Potapenko via Linux-f2fs-devel 2023-01-10 12:27 ` Alexander Potapenko 2023-01-10 12:47 ` David Sterba 2023-01-10 12:47 ` [f2fs-dev] " David Sterba 2023-01-10 18:42 ` Eric Biggers 2023-01-10 18:42 ` Eric Biggers 2022-11-21 11:21 ` [PATCH 3/5] fs: f2fs: initialize fsdata in pagecache_write() Alexander Potapenko 2022-11-21 11:21 ` [f2fs-dev] " Alexander Potapenko via Linux-f2fs-devel 2022-11-21 19:53 ` Eric Biggers 2022-11-21 19:53 ` Eric Biggers 2023-01-23 6:59 ` Eric Biggers 2023-01-23 6:59 ` [f2fs-dev] " Eric Biggers 2023-01-26 21:09 ` Jaegeuk Kim 2023-01-26 21:09 ` [f2fs-dev] " Jaegeuk Kim 2022-11-21 11:21 ` [PATCH 4/5] fs: hfs: initialize fsdata in hfs_file_truncate() Alexander Potapenko 2022-11-21 11:21 ` [f2fs-dev] " Alexander Potapenko via Linux-f2fs-devel 2023-01-24 10:51 ` Alexander Potapenko 2023-01-24 10:51 ` [f2fs-dev] " Alexander Potapenko via Linux-f2fs-devel 2023-01-24 21:04 ` Andrew Morton 2023-01-24 21:04 ` [f2fs-dev] " Andrew Morton 2023-01-25 9:51 ` Alexander Potapenko 2023-01-25 9:51 ` [f2fs-dev] " Alexander Potapenko via Linux-f2fs-devel 2022-11-21 11:21 ` Alexander Potapenko [this message] 2022-11-21 11:21 ` [f2fs-dev] [PATCH 5/5] fs: hfsplus: initialize fsdata in hfsplus_file_truncate() Alexander Potapenko via Linux-f2fs-devel 2022-11-21 19:48 ` [PATCH 1/5] fs: ext4: initialize fsdata in pagecache_write() Andrew Morton 2022-11-21 19:48 ` [f2fs-dev] " Andrew Morton 2022-11-22 3:40 ` Matthew Wilcox 2022-11-22 3:40 ` [f2fs-dev] " Matthew Wilcox 2022-11-21 19:52 ` Eric Biggers 2022-11-21 19:52 ` [f2fs-dev] " Eric Biggers
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221121112134.407362-5-glider@google.com \ --to=glider@google.com \ --cc=adilger.kernel@dilger.ca \ --cc=akpm@linux-foundation.org \ --cc=chao@kernel.org \ --cc=ebiggers@kernel.org \ --cc=jaegeuk@kernel.org \ --cc=linux-ext4@vger.kernel.org \ --cc=linux-f2fs-devel@lists.sourceforge.net \ --cc=linux-fsdevel@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=tytso@mit.edu \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.