Patch "affs: initialize fsdata in affs_truncate()" has been added to the 4.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    affs: initialize fsdata in affs_truncate()

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     affs-initialize-fsdata-in-affs_truncate.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 3be7a9572dd41f0115fb5fcfd83b53363f98da55
Author: Alexander Potapenko <glider@xxxxxxxxxx>
Date:   Tue Jan 10 13:49:30 2023 +0100

    affs: initialize fsdata in affs_truncate()
    
    [ Upstream commit eef034ac6690118c88f357b00e2b3239c9d8575d ]
    
    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.
    
    Fixes: f2b6a16eb8f5 ("fs: affs convert to new aops")
    Suggested-by: Eric Biggers <ebiggers@xxxxxxxxxx>
    Signed-off-by: Alexander Potapenko <glider@xxxxxxxxxx>
    Reviewed-by: David Sterba <dsterba@xxxxxxxx>
    Signed-off-by: David Sterba <dsterba@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/affs/file.c b/fs/affs/file.c
index ba084b0b214b..82bb38370aa9 100644
--- a/fs/affs/file.c
+++ b/fs/affs/file.c
@@ -878,7 +878,7 @@ affs_truncate(struct inode *inode)
 	if (inode->i_size > AFFS_I(inode)->mmu_private) {
 		struct address_space *mapping = inode->i_mapping;
 		struct page *page;
-		void *fsdata;
+		void *fsdata = NULL;
 		loff_t isize = inode->i_size;
 		int res;
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux