linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Bobrowski <mbobrowski@mbobrowski.org>
To: Jan Kara <jack@suse.cz>
Cc: syzbot <syzbot+991400e8eba7e00a26e1@syzkaller.appspotmail.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	riteshh@linux.ibm.com, syzkaller-bugs@googlegroups.com,
	tytso@mit.edu, viro@zeniv.linux.org.uk
Subject: Re: WARNING in iov_iter_pipe
Date: Mon, 11 Nov 2019 19:16:29 +1100	[thread overview]
Message-ID: <20191111081628.GB14058@bobrowski> (raw)
In-Reply-To: <20191108103148.GE20863@quack2.suse.cz>

On Fri, Nov 08, 2019 at 11:31:48AM +0100, Jan Kara wrote:
> On Thu 07-11-19 10:54:10, syzbot wrote:
> > syzbot found the following crash on:
> > 
> > HEAD commit:    c68c5373 Add linux-next specific files for 20191107
> > git tree:       linux-next
> > console output: https://syzkaller.appspot.com/x/log.txt?x=13d6bcfce00000
> > kernel config:  https://syzkaller.appspot.com/x/.config?x=742545dcdea21726
> > dashboard link: https://syzkaller.appspot.com/bug?extid=991400e8eba7e00a26e1
> > compiler:       gcc (GCC) 9.0.0 20181231 (experimental)
> > syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1529829ae00000
> > C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=16a55c0ce00000
> > 
> > The bug was bisected to:
> > 
> > commit b1b4705d54abedfd69dcdf42779c521aa1e0fbd3
> > Author: Matthew Bobrowski <mbobrowski@mbobrowski.org>
> > Date:   Tue Nov 5 12:01:37 2019 +0000
> > 
> >     ext4: introduce direct I/O read using iomap infrastructure
> 
> Hum, interesting and from the first looks the problem looks real.
> Deciphered reproducer is:
> 
> int fd0 = open("./file0", O_RDWR | O_CREAT | O_EXCL | O_DIRECT, 0);
> int fd1 = open("./file0, O_RDONLY);
> write(fd0, "some_data...", 512);
> sendfile(fd0, fd1, NULL, 0x7fffffa7);
>   -> this is interesting as it will result in reading data from 'file0' at
>      offset X with buffered read and writing them with direct write to
>      offset X+512. So this way we'll grow the file up to those ~2GB in
>      512-byte chunks.
> - not sure if we ever get there but the remainder of the reproducer is:
> fd2 = open("./file0", O_RDWR | O_CREAT | O_NOATIME | O_SYNC, 0);
> sendfile(fd2, fd0, NULL, 0xffffffff)
>   -> doesn't seem too interesting as fd0 is at EOF so this shouldn't do
>      anything.
> 
> Matthew, can you have a look?

Sorry Jan, I've been crazy busy lately and I'm out at training this
week. Let me take a look at this and see whether I can determine
what's happening here.

/M

  reply	other threads:[~2019-11-11  8:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07 18:54 WARNING in iov_iter_pipe syzbot
2019-11-08 10:31 ` Jan Kara
2019-11-11  8:16   ` Matthew Bobrowski [this message]
2019-11-19  3:10     ` Eric Biggers
2019-11-19 10:08       ` Matthew Bobrowski

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=20191111081628.GB14058@bobrowski \
    --to=mbobrowski@mbobrowski.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riteshh@linux.ibm.com \
    --cc=syzbot+991400e8eba7e00a26e1@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).