From: Dmitry Monakhov <dmonakhov@openvz.org>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
ext4 development <linux-ext4@vger.kernel.org>,
Theodore Ts'o <tytso@mit.edu>, Al Viro <viro@ZenIV.linux.org.uk>
Subject: Re: [PATCH] fs: make generic_block_fiemap sig-tolerant PING2...
Date: Wed, 10 Dec 2014 16:49:18 +0300 [thread overview]
Message-ID: <87zjavehsx.fsf@openvz.org> (raw)
In-Reply-To: <871toikt7c.fsf@openvz.org>
[-- Attachment #1: Type: text/plain, Size: 1106 bytes --]
Hello. Someone please take care of this patch.
W/o that patch unprivileged user may abuse system resources simply by spawning
wast number of unkilable busyloops (works on ext2/ext3):
truncate --size 1T test
for ((i=0;i<1024;i++))
do
filefrag test > /dev/null &
done
Dmitry Monakhov <dmonakhov@openvz.org> writes:
> Andrew can you please get this patch. IMHO it is simple and clean.
> BTW:
>
>> __generic_block_fiemap may spin very long time for large sparse files.
>>
>> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
>> ---
>> fs/ioctl.c | 5 +++++
>> 1 files changed, 5 insertions(+), 0 deletions(-)
>>
>> diff --git a/fs/ioctl.c b/fs/ioctl.c
>> index 8ac3fad..6fbeb68 100644
>> --- a/fs/ioctl.c
>> +++ b/fs/ioctl.c
>> @@ -379,6 +379,11 @@ int __generic_block_fiemap(struct inode *inode,
>> past_eof = true;
>> }
>> cond_resched();
>> + if (fatal_signal_pending(current)) {
>> + ret = -EINTR;
>> + break;
>> + }
>> +
>> } while (1);
>>
>> /* If ret is 1 then we just hit the end of the extent array */
>> --
>> 1.7.1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]
next prev parent reply other threads:[~2014-12-10 13:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-17 13:24 [PATCH] fs: make generic_block_fiemap sig-tolerant Dmitry Monakhov
2014-12-02 14:43 ` [PATCH] fs: make generic_block_fiemap sig-tolerant PING Dmitry Monakhov
2014-12-10 13:49 ` Dmitry Monakhov [this message]
2014-12-18 23:12 ` [PATCH] fs: make generic_block_fiemap sig-tolerant PING2 Andrew Morton
2014-12-19 9:13 ` Dmitry Monakhov
2014-12-19 21:33 ` Andrew Morton
2014-12-19 23:38 ` Andreas Dilger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zjavehsx.fsf@openvz.org \
--to=dmonakhov@openvz.org \
--cc=akpm@linux-foundation.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.