Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ext4: avoid kmemcheck complaint from reading uninitialized memory

Commit 03179fe923 introduced a kmemcheck complaint in
ext4_da_get_block_prep() because we save and restore
ei->i_da_metadata_calc_last_lblock even though it is left
uninitialized in the case where i_da_metadata_calc_len is zero.

This doesn't hurt anything, but silencing the kmemcheck complaint
makes it easier for people to find real bugs.

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=45631
(which is marked as a regression).

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@vger.kernel.org

+1
+1
fs/ext4/super.c
··· 959 959 ei->i_reserved_meta_blocks = 0; 960 960 ei->i_allocated_meta_blocks = 0; 961 961 ei->i_da_metadata_calc_len = 0; 962 + ei->i_da_metadata_calc_last_lblock = 0; 962 963 spin_lock_init(&(ei->i_block_reservation_lock)); 963 964 #ifdef CONFIG_QUOTA 964 965 ei->i_reserved_quota = 0;