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>] [day] [month] [year] [list]
Date:	Tue, 12 Nov 2013 17:20:14 +1100
From:	NeilBrown <neilb@...e.de>
To:	Al Viro <viro@...IV.linux.org.uk>
Cc:	lkml <linux-kernel@...r.kernel.org>
Subject: [PATCH] add cond_resched() to shrink_dcache_for_umount_subtree()


Much like the other shrink_dcache_*() functions,
shrink_dcache_for_umount_subtree() could run for a long time if the dcache
has many entries, so an occasional "cond_resched" is needed to avoid stalls
and soft-lockup warnings.

Unlike the other shrinkers, there is no cond_resched call here.  So add one.

Signed-off-by: NeilBrown <neilb@...e.de>

diff --git a/fs/dcache.c b/fs/dcache.c
index ae6ebb88ceff..1811fa19b419 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1154,6 +1154,7 @@ static void shrink_dcache_for_umount_subtree(struct dentry *dentry)
 
 		dentry = list_entry(dentry->d_subdirs.next,
 				    struct dentry, d_u.d_child);
+		cond_resched()
 	}
 }
 

Download attachment "signature.asc" of type "application/pgp-signature" (829 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ