https://github.com/torvalds/linux
Revision c27d82f52f75fc9d8d9d40d120d2a96fdeeada5e authored by Jan Kara on 01 February 2019, 22:21:23 UTC, committed by Linus Torvalds on 01 February 2019, 23:46:24 UTC
When superblock has lots of inodes without any pagecache (like is the
case for /proc), drop_pagecache_sb() will iterate through all of them
without dropping sb->s_inode_list_lock which can lead to softlockups
(one of our customers hit this).

Fix the problem by going to the slow path and doing cond_resched() in
case the process needs rescheduling.

Link: http://lkml.kernel.org/r/20190114085343.15011-1-jack@suse.cz
Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent e0a352f
Raw File
Tip revision: c27d82f52f75fc9d8d9d40d120d2a96fdeeada5e authored by Jan Kara on 01 February 2019, 22:21:23 UTC
fs/drop_caches.c: avoid softlockups in drop_pagecache_sb()
Tip revision: c27d82f
COPYING
The Linux Kernel is provided under:

	SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note

Being under the terms of the GNU General Public License version 2 only,
according with:

	LICENSES/preferred/GPL-2.0

With an explicit syscall exception, as stated at:

	LICENSES/exceptions/Linux-syscall-note

In addition, other licenses may also apply. Please see:

	Documentation/process/license-rules.rst

for more details.
back to top