* [PATCH -next] ext4: Fix access uninitialized 'retval' in kmmpd
@ 2021-07-13 2:27 Ye Bin
2021-07-23 11:31 ` Theodore Ts'o
0 siblings, 1 reply; 2+ messages in thread
From: Ye Bin @ 2021-07-13 2:27 UTC (permalink / raw)
To: tytso, jack, adilger.kernel, linux-ext4, linux-kernel; +Cc: yukuai3, Ye Bin
If (!ext4_has_feature_mmp(sb)) then goto 'wait_to_exit' label, but
retval not be uninitialized.
Fixes: 61bb4a1c417e ("ext4: fix possible UAF when remounting r/o a mmp-protected file system")
Signed-off-by: Ye Bin <yebin10@huawei.com>
---
fs/ext4/mmp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] ext4: Fix access uninitialized 'retval' in kmmpd
2021-07-13 2:27 [PATCH -next] ext4: Fix access uninitialized 'retval' in kmmpd Ye Bin
@ 2021-07-23 11:31 ` Theodore Ts'o
0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2021-07-23 11:31 UTC (permalink / raw)
To: Ye Bin; +Cc: jack, adilger.kernel, linux-ext4, linux-kernel, yukuai3
On Tue, Jul 13, 2021 at 10:27:28AM +0800, Ye Bin wrote:
> If (!ext4_has_feature_mmp(sb)) then goto 'wait_to_exit' label, but
> retval not be uninitialized.
>
> Fixes: 61bb4a1c417e ("ext4: fix possible UAF when remounting r/o a mmp-protected file system")
> Signed-off-by: Ye Bin <yebin10@huawei.com>
Thanks, applied with a slightly fixed up commit description.
- Ted
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-23 11:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-13 2:27 [PATCH -next] ext4: Fix access uninitialized 'retval' in kmmpd Ye Bin
2021-07-23 11:31 ` Theodore Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).