From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751904AbbJBWEo (ORCPT ); Fri, 2 Oct 2015 18:04:44 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:59803 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751825AbbJBWEm (ORCPT ); Fri, 2 Oct 2015 18:04:42 -0400 Date: Fri, 2 Oct 2015 15:04:40 -0700 From: Andrew Morton To: Maxim Patlasov Cc: Konstantin Khlebnikov , Roman Gushchin , , Linux Kernel Mailing List , Al Viro , Miklos Szeredi Subject: Re: [fuse-devel] [PATCH] fuse: break infinite loop in fuse_fill_write_pages() Message-Id: <20151002150440.e691f6c81619794f8a947263@linux-foundation.org> In-Reply-To: <560EDAB1.5090605@parallels.com> References: <1442829773-14150-1-git-send-email-klamm@yandex-team.ru> <560EDAB1.5090605@parallels.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2 Oct 2015 12:27:45 -0700 Maxim Patlasov 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 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.