From: Al Viro <viro@ZenIV.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Joseph Salisbury <joseph.salisbury@canonical.com>,
fangwei1@huawei.com, Christoph Hellwig <hch@infradead.org>,
Dave Chinner <david@fromorbit.com>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [v4.9 Regression] vfs,mm: fix a dead loop in truncate_inode_pages_range()
Date: Wed, 14 Dec 2016 21:15:19 +0000 [thread overview]
Message-ID: <20161214211519.GP1555@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CA+55aFwVfyQUfQ5-QjosmmKbu95-4EmbgFyTg=SevFbZdcCFbQ@mail.gmail.com>
On Wed, Dec 14, 2016 at 12:27:41PM -0800, Linus Torvalds wrote:
> diff --git a/mm/filemap.c b/mm/filemap.c
> index 69568388c699..b06517b7f97f 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -1637,7 +1637,7 @@ static ssize_t do_generic_file_read(struct file *filp, loff_t *ppos,
> int error = 0;
>
> if (unlikely(*ppos >= inode->i_sb->s_maxbytes))
> - return -EINVAL;
> + return 0;
> iov_iter_truncate(iter, inode->i_sb->s_maxbytes);
BTW, shouldn't we truncate to *ppos - inode->i_sb->s_maxbytes here as well?
next prev parent reply other threads:[~2016-12-14 21:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-14 19:27 [v4.9 Regression] vfs,mm: fix a dead loop in truncate_inode_pages_range() Joseph Salisbury
2016-12-14 20:27 ` Linus Torvalds
2016-12-14 20:45 ` Linus Torvalds
2016-12-14 21:14 ` Linus Torvalds
2016-12-19 10:45 ` Christoph Hellwig
2016-12-19 15:56 ` Linus Torvalds
2016-12-14 21:15 ` Al Viro [this message]
2016-12-14 21:27 ` Linus Torvalds
2016-12-14 21:30 ` Linus Torvalds
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=20161214211519.GP1555@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=akpm@linux-foundation.org \
--cc=david@fromorbit.com \
--cc=fangwei1@huawei.com \
--cc=hch@infradead.org \
--cc=joseph.salisbury@canonical.com \
--cc=stable@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox