summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2015-11-23 13:09:51 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-03 15:06:21 -0800
commitb63a96fada140801597b62a2a6a6818a96ae39e9 (patch)
tree7eb64a9e8e5448bba42aa2c5111a0e0d196a912a /drivers
parent677eea664a18f46ec7186d1b0a1595f8ac2cb959 (diff)
downloadlwn-b63a96fada140801597b62a2a6a6818a96ae39e9.tar.gz
lwn-b63a96fada140801597b62a2a6a6818a96ae39e9.zip
vfs: Avoid softlockups with sendfile(2)
commit c2489e07c0a71a56fb2c84bc0ee66cddfca7d068 upstream. The following test program from Dmitry can cause softlockups or RCU stalls as it copies 1GB from tmpfs into eventfd and we don't have any scheduling point at that path in sendfile(2) implementation: int r1 = eventfd(0, 0); int r2 = memfd_create("", 0); unsigned long n = 1<<30; fallocate(r2, 0, 0, n); sendfile(r1, r2, 0, n); Add cond_resched() into __splice_from_pipe() to fix the problem. CC: Dmitry Vyukov <dvyukov@google.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions