Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1238717
| From | Konstantin Khlebnikov <koct9i@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [fuse-devel] [PATCH] fuse: break infinite loop in fuse_fill_write_pages() |
| Date | 2015-10-03 04:00 +0200 |
| Message-ID | <qfkhb-4mS-3@gated-at.bofh.it> (permalink) |
| References | <qb6cN-3uu-1@gated-at.bofh.it> <qf6Hg-1V1-15@gated-at.bofh.it> <qfebL-4hK-9@gated-at.bofh.it> <qfgGE-7W4-59@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sat, Oct 3, 2015 at 1:04 AM, Andrew Morton <akpm@linux-foundation.org> wrote: > On Fri, 2 Oct 2015 12:27:45 -0700 Maxim Patlasov <mpatlasov@parallels.com> wrote: > >> On 10/02/2015 04:21 AM, Konstantin Khlebnikov wrote: >> > Bump. Add more peopple in CC. >> > >> > On Mon, Sep 21, 2015 at 1:02 PM, Roman Gushchin <klamm@yandex-team.ru> wrote: >> >> I got a report about unkillable task eating CPU. Thge further >> >> investigation shows, that the problem is in the fuse_fill_write_pages() >> >> function. If iov's first segment has zero length, we get an infinite >> >> loop, because we never reach iov_iter_advance() call. >> >> iov_iter_copy_from_user_atomic() eventually calls iterate_iovec(). The >> latter silently consumes zero-length iov. So I don't think "iov's first >> segment has zero length" can cause infinite loop. > > I'm suspecting it got stuck because local variable `bytes' is zero, so > the code does `goto again' repeatedly. > > Or maybe not. A more complete description of the bug would help. I suspect here is the same scenario like in 124d3b7041f: Zero-length segmend is followed by segment with invalid address: iov_iter_fault_in_readable() checks only first segment (zero-length) iov_iter_copy_from_user_atomic() skips it, fails at second and returns zero -> goto again without skipping zero-length segment. Patch calls iov_iter_advance() before goto again: we'll skip zero-length segment at second iteraction and iov_iter_fault_in_readable() will detect invalid address. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] fuse: break infinite loop in fuse_fill_write_pages() Konstantin Khlebnikov <koct9i@gmail.com> - 2015-10-02 13:30 +0200
Re: [fuse-devel] [PATCH] fuse: break infinite loop in fuse_fill_write_pages() Maxim Patlasov <mpatlasov@parallels.com> - 2015-10-02 21:30 +0200
Re: [fuse-devel] [PATCH] fuse: break infinite loop in fuse_fill_write_pages() Andrew Morton <akpm@linux-foundation.org> - 2015-10-03 00:10 +0200
Re: [fuse-devel] [PATCH] fuse: break infinite loop in fuse_fill_write_pages() Konstantin Khlebnikov <koct9i@gmail.com> - 2015-10-03 04:00 +0200
Re: [fuse-devel] [PATCH] fuse: break infinite loop in fuse_fill_write_pages() Maxim Patlasov <mpatlasov@parallels.com> - 2015-10-05 20:40 +0200
csiph-web