mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: John Hubbard <jhubbard@nvidia.com>
Cc: dhowells@redhat.com, David Hildenbrand <david@redhat.com>,
	syzbot <syzbot+a440341a59e3b7142895@syzkaller.appspotmail.com>,
	hch@lst.de, linux-kernel@vger.kernel.org,
	syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] general protection fault in skb_dequeue (3)
Date: Fri, 03 Feb 2023 16:30:21 +0000	[thread overview]
Message-ID: <2116767.1675441821@warthog.procyon.org.uk> (raw)
In-Reply-To: <2076817.1675434996@warthog.procyon.org.uk>

David Howells <dhowells@redhat.com> wrote:

> I think I have managed to isolate the bug to the read side of sendfile() or
> the pipe in the middle by the following:
> 
> In iter_file_splice_write(), I allocate a permanent page:
> ...
> and then stick it into the BVEC iter to be handed over to vfs_iter_write()
> instead of buf->page:
> 
> -			array[n].bv_page = buf->page;
> +			array[n].bv_page = splice_tmp;
> +			trace_page_ref_set(splice_tmp, 887);
>  			array[n].bv_len = this_len;
>  			array[n].bv_offset = buf->offset;
> 
> that prevents vfs_iter_write() from ever seeing the pages from the pipe - but
> the crash still happens even with this change.

With the DIO output isolation in iov_iter_extract_pipe_pages(), this change
can be removed without causing oopses to happen.

David


  parent reply	other threads:[~2023-02-03 16:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-01 10:04 syzbot
2023-02-02  8:52 ` David Howells
2023-02-02  9:02   ` David Hildenbrand
2023-02-02 15:15   ` David Howells
2023-02-03  2:54     ` John Hubbard
2023-02-03  8:36     ` David Howells
2023-02-03 14:36     ` David Howells
2023-02-03 16:23     ` David Howells
2023-02-03 16:27     ` How does ftruncate() interact with DIO read? David Howells
2023-02-03 16:31       ` Christoph Hellwig
2023-02-03 16:30     ` David Howells [this message]
2023-02-02 23:10   ` [syzbot] general protection fault in skb_dequeue (3) John Hubbard
2023-02-07 11:22 ` David Howells
2023-02-07 12:29   ` syzbot
     [not found] <20230201115301.463-1-hdanton@sina.com>
2023-02-01 15:15 ` syzbot
     [not found] <20230201233913.650-1-hdanton@sina.com>
2023-02-02  5:53 ` syzbot
     [not found] <20230207095807.1448-1-hdanton@sina.com>
2023-02-07 10:24 ` syzbot

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=2116767.1675441821@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=david@redhat.com \
    --cc=hch@lst.de \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+a440341a59e3b7142895@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /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

all inboxes | Powered by JetHome®