aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYe Bin <[email protected]>2021-07-13 10:27:28 +0800
committerTheodore Ts'o <[email protected]>2021-07-23 07:31:29 -0400
commitb66541422824cf6cf20e9a35112e9cb5d82cdf62 (patch)
treea77165579a22e732bfbf9e28a55a5ffdba51a142
parent2734d6c1b1a089fb593ef6a23d4b70903526fe0c (diff)
ext4: fix potential uninitialized access to retval in kmmpd
if (!ext4_has_feature_mmp(sb)) then retval can be unitialized before we jump to the wait_to_exit label. Fixes: 61bb4a1c417e ("ext4: fix possible UAF when remounting r/o a mmp-protected file system") Signed-off-by: Ye Bin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
-rw-r--r--fs/ext4/mmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/mmp.c b/fs/ext4/mmp.c
index bc364c119af6..cebea4270817 100644
--- a/fs/ext4/mmp.c
+++ b/fs/ext4/mmp.c
@@ -138,7 +138,7 @@ static int kmmpd(void *data)
unsigned mmp_check_interval;
unsigned long last_update_time;
unsigned long diff;
- int retval;
+ int retval = 0;
mmp_block = le64_to_cpu(es->s_mmp_block);
mmp = (struct mmp_struct *)(bh->b_data);