Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp766023ybj; Thu, 19 Sep 2019 23:10:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqxyTIS/2pCx0weR/KLo3xAjmShYJ1JiMrFlW330Jqbb5DzeMw4dCWQ+wFpm7IWFT2TYRQxu X-Received: by 2002:a17:906:c721:: with SMTP id fj1mr15047594ejb.177.1568959841350; Thu, 19 Sep 2019 23:10:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568959841; cv=none; d=google.com; s=arc-20160816; b=VWJT2ll5dG2NxiF1nefvnnTxJeqVzP0cMANYS+JktaPPOjYFvllGv8gwQWXFGvv1fn UgdDNejUNTSIX2s/Ve6nUXwqiEgKwO6vJcZ0YRjBIunt//A6bfXBLm3d41Ca1OxJaQU0 NDtXvFgBIpiRlK16HW5R3C8vsm7Q5vaclZggFbxe36yLmRcoViOTiKLFmItlVqyVfiE5 jXAIf+oUdHyVwl6CYbxwa+opUMep8UjQb+79xeMWGdhZ+fvi5W8ZHkA14BOswWaICZ9Z JxMZVV3/MhTwqNeUrpZxWZ01leJ94RaJR9jueeKxD2n5gFoNLPm49bM3LO6l6at8DzUa 8VIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=oOsPY7dzPYXiWz16EZVCaTHv03LDObuM8JWwXte1DFk=; b=f3FRTPtr3yr8rKu+9C9KNFt5jAXpYQyFxNhCC0nGe2TGeSxQ2HFp9r9XEbcL9Nn4Wy 6Lc9V/1bTJ9ZdVZstdw4LXS9TZPbmQ3cve3GRlxKpJ3hBAlndjc6ZZ30QogKluHzJpRz 7kHsk/d1Z/Y629poztfIyhH2T/sCpdDzstJlXYP9dMcSJ0TRdT2CMJL30MSrVZsdUmvH DlZ0xIABTy0Lksw/iDiN4EhvybfBdFAMoIuMTUlSUEgHAdoC0LZjiInJZRn8+TWdy4Lt ed4my3+/2BJaN2lbgGGCKf9BkifmIV++yek5WxX79VrT/l8A31sPUB/OsM+9hWchGwD3 vdsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=I+iiAiaI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j28si827013eda.161.2019.09.19.23.10.18; Thu, 19 Sep 2019 23:10:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=I+iiAiaI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732804AbfISUzs (ORCPT + 99 others); Thu, 19 Sep 2019 16:55:48 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:39151 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730064AbfISUzs (ORCPT ); Thu, 19 Sep 2019 16:55:48 -0400 Received: by mail-ed1-f65.google.com with SMTP id a15so1747412edt.6 for ; Thu, 19 Sep 2019 13:55:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=oOsPY7dzPYXiWz16EZVCaTHv03LDObuM8JWwXte1DFk=; b=I+iiAiaIIT1nzYGWMnmtIf3Q6k+Hv0VaD1K0im3yX9TzkVKsN7MjqK0bhtqBQoluxh zPtgCkfNEGABORe8XY+4RWdDCfjGP4b5ZINwVGwiyiM7uKbYzfGbtmNpS2Az7ucR658B SZSdFTywaXV9o0GkxZjdWIXycr76F2bwWxO48= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=oOsPY7dzPYXiWz16EZVCaTHv03LDObuM8JWwXte1DFk=; b=SIN6DZka97VzCxNtq2J9FEqV4z1DgrGvH5mpjGqy4FvtUcLEYmNBZU7/MVWZO2CvGJ I+PhmlKbbeiY7iS1rpIAKi+thHs9tNs9cuHTRy5KC9fYMYky6IE+XD1YQnyMTgrC1kwY /ZdY8IHfxvnq3R6kBoQzYbVA9yk72wSUL5yVFr5CK7854ABXreEM/cmIGBIRJBX7nAPV a2vXskDaZsqIfqeNHhR4/hTzzPoGdaR47qzlFPZ63LQZaRP7+yxelKfL16XN/iTPSlnL eKzU0kCYgX/5wFKHyGChep9GVSaOFtV6Z5UoogaebLO8Tx6gJDtfBZYms2EkhmPd98H9 frZA== X-Gm-Message-State: APjAAAU8ZwXWXYMlGkBgbdTW3EGXSb/vLbf0rD4Br5Cv4iMtP8Ttdft/ o7lhfJS/6pWcyW9ZKw446w9PVeVTPF5oMMYi X-Received: by 2002:a17:906:944b:: with SMTP id z11mr15601123ejx.46.1568926546319; Thu, 19 Sep 2019 13:55:46 -0700 (PDT) Received: from [192.168.1.149] (ip-5-186-115-35.cgn.fibianet.dk. [5.186.115.35]) by smtp.gmail.com with ESMTPSA id fx25sm1148608ejb.19.2019.09.19.13.55.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Sep 2019 13:55:45 -0700 (PDT) Subject: Re: INFO: task hung in pipe_write (2) To: syzbot , agruenba@redhat.com, darrick.wong@oracle.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, viro@zeniv.linux.org.uk References: <000000000000ac6a360592eb26c1@google.com> From: Rasmus Villemoes Message-ID: Date: Thu, 19 Sep 2019 22:55:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <000000000000ac6a360592eb26c1@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/09/2019 19.19, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:    288b9117 Add linux-next specific files for 20190918 > git tree:       linux-next > console output: https://syzkaller.appspot.com/x/log.txt?x=17e86645600000 > kernel config:  https://syzkaller.appspot.com/x/.config?x=f6126e51304ef1c3 > dashboard link: > https://syzkaller.appspot.com/bug?extid=3c01db6025f26530cf8d > compiler:       gcc (GCC) 9.0.0 20181231 (experimental) > syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=11855769600000 > C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=143580a1600000 > > The bug was bisected to: > > commit cfb864757d8690631aadf1c4b80022c18ae865b3 > Author: Darrick J. Wong > Date:   Tue Sep 17 16:05:22 2019 +0000 > >     splice: only read in as much information as there is pipe buffer space The middle hunk (the one before splice_pipe_to_pipe()) accesses opipe->{buffers, nrbufs}, but opipe is not locked at that point. So maybe we end up passing len==0, which seems (once there's room in opipe) it would put a zero-length pipe_buffer in opipe - and that probably violates an invariant somewhere. But does the splice_pipe_to_pipe() case even need that extra logic? Doesn't it handle short writes correctly already? Rasmus