Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3749586ybi; Mon, 10 Jun 2019 16:15:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqxpR0u8oH0byeU1NIEaoB+XBvJsYqHd0WNYaFTIuziKW//clM6eF7Raz9D9UKLYMt1yclOY X-Received: by 2002:a63:1d1d:: with SMTP id d29mr7684511pgd.259.1560208512211; Mon, 10 Jun 2019 16:15:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560208512; cv=none; d=google.com; s=arc-20160816; b=CU26kHbcglsl0MC5O/WXnT+b8r0LiU7GgaVM3g28kkmJl7ibQFbLT/HukczNpvdIy/ h7+UVUUAWg+uHaN3dwSvqgh4TOutyOEWwDfdoK2SuX3vXROXipUAmcauVtvCueV59pyD v8A0RRoo74Jz0zziAnj1jTaG2iHhP8is2D3/d6uukvD0Y6OxufUTSp4C3xLYZ7Y75IW7 aFp31zTbHrGmSXanVlMdR3Vhs3pjjPYrSCwEecAYHNtZsDyOrJkezwhJ8lSlZYYi4bar 4SfffrGO+bEFk1mnFT+IeRRGZbRMLTR1p+YVfBA58laikTcYHhg9W9+/+VtTpj0Q0c5R MF6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ZE7OTXmkAZk/1rd8pmi0GDZoWbAu2B1XqC3DqKDjGHo=; b=EfJnQw2Rp++ParU2AvZtdk/ryupGDd+dhGzwQhFQ7B8rCxwS5QGtkAlY37E8fzLixP imDZFSqlJgcZgG6V5lz3Y50627JxJs0wFnMTh3/aEYoHiYG3UTbjoZePDfp9ko2RrzVV DEhN/QHh5Q3eFesj8kvJAxW71lDchTH4xQgYQgzMTknDqVDmQ97ITrMBkOqR7iausuFX S6wFyhhQRVoQVgNOkoQ4D/gwaETatqEUXHjzdbmdQq2jplV9aeXW4fSB0fFUebcpkB/3 84QtnaQMgB+YMGup11FJ6d42bXAY4KjczkjaouF+X8l+GEGLqRgjvkyKc4I3JtSjPTUr Pa0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oXevS+q4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m6si729631pjl.60.2019.06.10.16.14.57; Mon, 10 Jun 2019 16:15:12 -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=@kernel.org header.s=default header.b=oXevS+q4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390570AbfFJXOH (ORCPT + 99 others); Mon, 10 Jun 2019 19:14:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:53310 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390340AbfFJXOG (ORCPT ); Mon, 10 Jun 2019 19:14:06 -0400 Received: from gmail.com (unknown [104.132.1.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DE52820859; Mon, 10 Jun 2019 23:14:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560208446; bh=1znbKbPJNbimnR4+MsOLwFF4y5Rj5sFfCVC3jk2xIAc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oXevS+q4qXOL7M6k9CFJifTza+Kp/5K8C/xY5scvGNIU/Y3g8+WncH2XXv3UZiud6 NsxkAB6IUZdt34lejn50ijPpUuzPX/w3TYfTkcvYvd9XF72zEWpRug2xtjjMwWIB0L e1UO/HznlOcoQhP8TW8X7jq7yhqrKc1b/IihEZGc= Date: Mon, 10 Jun 2019 16:14:04 -0700 From: Eric Biggers To: Chris Mason , Josef Bacik , David Sterba , linux-btrfs@vger.kernel.org Cc: Dmitry Vyukov , Anand Jain , syzbot , LKML , syzkaller-bugs Subject: Re: kernel BUG at fs/btrfs/volumes.c:LINE! Message-ID: <20190610231403.GZ63833@gmail.com> References: <00000000000096009b056df92dc1@google.com> <70a3c2d1-3f53-d4c0-13b3-29f836ec46d9@oracle.com> <20180607153450.GF3215@twin.jikos.cz> <20180607165213.GI3215@twin.jikos.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180607165213.GI3215@twin.jikos.cz> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 07, 2018 at 06:52:13PM +0200, David Sterba wrote: > On Thu, Jun 07, 2018 at 06:28:02PM +0200, Dmitry Vyukov wrote: > > > Normally the GFP_NOFS allocations do not fail so I think the fuzzer > > > environment is tuned to allow that, which is fine for coverage but does > > > not happen in practice. This will be fixed eventually. > > > > Isn't GFP_NOFS more restricted than normal allocations? Are these > > allocations accounted against memcg? It's easy to fail any allocation > > within a memory container. > > https://lwn.net/Articles/723317/ The 'too small to fail' and some > unwritten semantics of GFP_NOFS but I think you're right about the > memory controler that can fail any allocation though. > > Error handling is being improved over time, the memory allocation > failures are in some cases hard and this one would need to update some > logic so it's not a oneliner. > This bug is still there. In btrfs_close_one_device(): if (device->name) { name = rcu_string_strdup(device->name->str, GFP_NOFS); BUG_ON(!name); /* -ENOMEM */ rcu_assign_pointer(new_device->name, name); } It assumes that the memory allocation succeeded. See syzbot report from v5.2-rc3 here: https://syzkaller.appspot.com/text?tag=CrashReport&x=16c839c1a00000 Is there any plan to fix this? - Eric