lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 23 Mar 2023 15:53:58 +0100
From:   Jan Kara <jack@...e.cz>
To:     Ted Tso <tytso@....edu>
Cc:     <linux-ext4@...r.kernel.org>, Eric Biggers <ebiggers@...nel.org>,
        Jan Kara <jack@...e.cz>
Subject: [PATCH 1/2] ext4: Fix data=journal writeback of DMA pinned page

The condition in ext4_writepages() checking whether the filesystem is
frozen had a brown paper bag bug resulting in us never writing back
DMA pinned pages. Fix the condition.

Reported-by: Eric Biggers <ebiggers@...nel.org>
Link: https://lore.kernel.org/all/20230319183617.GA896@sol.localdomain
Fixes: 18b7f4107219 ("ext4: Fix warnings when freezing filesystem with journaled data")
Signed-off-by: Jan Kara <jack@...e.cz>
---
 fs/ext4/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 3e311c85df08..15bac8181798 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2436,7 +2436,7 @@ static int mpage_prepare_extent_to_map(struct mpage_da_data *mpd)
 	 * loop clears them.
 	 */
 	if (ext4_should_journal_data(mpd->inode) &&
-	    sb->s_writers.frozen >= SB_FREEZE_FS) {
+	    sb->s_writers.frozen < SB_FREEZE_FS) {
 		handle = ext4_journal_start(mpd->inode, EXT4_HT_WRITE_PAGE,
 					    bpp);
 		if (IS_ERR(handle))
-- 
2.35.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ