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-next>] [day] [month] [year] [list]
Date:	Fri,  1 Aug 2014 12:06:12 -0400
From:	Jeff Harris <jefftharris@...il.com>
To:	David Woodhouse <dwmw2@...radead.org>,
	linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc:	Jeff Harris <jharris@...tell.com>
Subject: [PATCH] jffs2: Re-enable write-buffering after filesystem sync

A JFFS2 filesystem sync cancels the write buffering dirty work and performs
the flush manually.  However, the flag which indicates that the work is active
is not reset.  Thus, if a sync happens while the work is pending, the flag
will never be reset resulting in future work never being started.  The flag is
now reset under the appropriate lock along with the timer cancellation.

Tested on 3.13.6.

Signed-off-by: Jeff Harris <jharris@...tell.com>
---
 fs/jffs2/super.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c
index 0918f0e..263136b 100644
--- a/fs/jffs2/super.c
+++ b/fs/jffs2/super.c
@@ -101,7 +101,10 @@ static int jffs2_sync_fs(struct super_block *sb, int wait)
 	struct jffs2_sb_info *c = JFFS2_SB_INFO(sb);
 
 #ifdef CONFIG_JFFS2_FS_WRITEBUFFER
+	spin_lock(&c->wbuf_dwork_lock);
 	cancel_delayed_work_sync(&c->wbuf_dwork);
+	c->wbuf_queued = 0;
+	spin_lock(&c->wbuf_dwork_lock);
 #endif
 
 	mutex_lock(&c->alloc_sem);
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ