Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1976470imm; Sat, 9 Jun 2018 05:34:35 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLQ5uF77zSJK5VahziF/QJmH2aohyH82R4b3uK/Yn2qjx510GUVE5w/JzsrnyseaZetAkBA X-Received: by 2002:a17:902:d90f:: with SMTP id c15-v6mr10606447plz.65.1528547675228; Sat, 09 Jun 2018 05:34:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528547675; cv=none; d=google.com; s=arc-20160816; b=bluIP5KliQGIfrgX0xW7WJFa72pRsi2+s1gsuTGxmhJNG5MzS4U1UtAtvRXcpaWET8 y3iNqF5Ijw9PcpS6/EPSmScw0HuFHN9N7/BKH1nBTbMI3Q0dyp2NklKIOsVoggj1962v hpsWijrDqck7/bfZyLabkcwlYCI1uIDGEPtMKyI5HhcxN7dP7tnnPOFYdkXhNtrDS5Tf HcrQYHCJ0CcRVzggH+3Ad1LNbPbYY8N2BcrZ5daxJIAF/rX+Rx4/9mkS5mQwg9vNikBS VyAwo+bhIIz1w6UW4vSDCCd32aOagumv5UAyNQ7ufxLyurVC2W0YTy8AWEdtIku1HEdy pBfw== 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 :arc-authentication-results; bh=jW6hgR/lmWQZibF0Io+xybkyN+YdJcUx2KHgybovV9k=; b=b4+miQdFji0/r4KdA0WHz3ViqZSIFxSAlLf0Ed4HpVVtANWXZdeEujORXRHrt7VDZo Yzc/JycvdzuzlNAkCuKV2/HibbJ7ESXxHZpUFX10DIcjt4Lr7/7yx+WOUF9bnJIddjq/ m9l2mZAWdZJ+s9zrW61nsja9p+V45R4F1xIEbZdcbXFAyU9XXQCNX48JSciWrS8EHdlX 1LlwfDGiTPcvF/LpHtJQ2SbkG1CVw+Mva9i+9SurBJNWzBMhUYp52mbLXXhBgv1/Q1Yh P33OxZ7gUKahTiKIgOTrfLI4sGSVZsCRabbmsWY5ZhtgssDL11eYw76hNFeXLHe4GyAl VGmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=ChB3PFsW; 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 g3-v6si46378146pgc.251.2018.06.09.05.34.20; Sat, 09 Jun 2018 05:34:35 -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-dk.20150623.gappssmtp.com header.s=20150623 header.b=ChB3PFsW; 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 S1753473AbeFIMdP (ORCPT + 99 others); Sat, 9 Jun 2018 08:33:15 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:53712 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753465AbeFIMdM (ORCPT ); Sat, 9 Jun 2018 08:33:12 -0400 Received: by mail-it0-f67.google.com with SMTP id a195-v6so5457347itd.3 for ; Sat, 09 Jun 2018 05:33:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=jW6hgR/lmWQZibF0Io+xybkyN+YdJcUx2KHgybovV9k=; b=ChB3PFsWVJXhJNXawx3piDyJ+GeXCPwymBT2j9R58VDyjSTJk87w0THZN5RjVrCSET M4QULPPhYiTQ0agCw4g2se3YekcBX3oTJAuGWRw/5jLB7KpLyYDJXsDM4W91sbDMlAZv oX2Rzy33CLwcGVCCMZUZWIFCHkrS/HmTv4Fk4Jm/u2pCBdGBq/neWxQMfpVpSt4OpeQt l81VlxOwGv0O+WS59YfYk7qrfSVEb4xdCJJqmjsjHFvW+TmtegAEVeBmGm5jAAgYhzdg YeXnmLdPsq4K8lI5OZ/gZnd7N1rQBJGo94OhsBBLqsX08EfELvYCMl4OkKxY9ZVtb+jI luow== 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=jW6hgR/lmWQZibF0Io+xybkyN+YdJcUx2KHgybovV9k=; b=BP4SPbkD9VIKqKJkNKIaW1FIyxsxczKSR6vvyKISW7tPwFnlklERVaNcnaL7Tr/2dt kStTkMMr52zU52q2Etq4n9yv9CdBksEk69BqpITD8rciW/oDY7Ayd53+qCLqbOOkyFqD KpDwJuR/6yn4xWnbSvgsSGnxSxmhfszUrtqg/hRtQXkEBW4DOwbMpR/8c6JR+3xzrSb/ VJBvgMJe0z8pp1yCKY0HerjX7r6iR9ncUwnHdVYgcnKKVWbkf/7cpW6CxFVQvaM/BC1C nWt0vlXdlBNmyL0mwpyzYHjZ/nMYcLhyfWxWSQ5JDmj3QX4+FVSvqX6qpB8tNjv57amf zl4Q== X-Gm-Message-State: APt69E1Va40HJ0HgGnKruXGUDz2uP5HAsZ7l2PQI78EtoknwVW53TYOG ZPzew06ZESVIrz4IoQnavUq3mA== X-Received: by 2002:a24:b611:: with SMTP id g17-v6mr5188348itf.63.1528547591528; Sat, 09 Jun 2018 05:33:11 -0700 (PDT) Received: from [192.168.1.212] (107.191.0.158.static.utbb.net. [107.191.0.158]) by smtp.gmail.com with ESMTPSA id 131-v6sm1875602itv.29.2018.06.09.05.33.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Jun 2018 05:33:10 -0700 (PDT) Subject: Re: mainline boot is broken: KASAN: use-after-free in blk_flush_complete_seq To: Dmitry Vyukov , linux-block@vger.kernel.org, LKML , Linus Torvalds References: From: Jens Axboe Message-ID: <1d8de494-0a52-33f5-4c8d-0ec08cfb101c@kernel.dk> Date: Sat, 9 Jun 2018 06:33:06 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/9/18 3:34 AM, Dmitry Vyukov wrote: > Hi, > > Boot of mainline kernel is currently broken. > On commit 7d3bf613e99abbd96ac7b90ee3694a246c975021. > Config: > https://gist.githubusercontent.com/dvyukov/9f7f1fd9e477efd85b221b3a21036c20/raw/7c56ede0840494b26045976960866f2b265c6f64/gistfile1.txt > Should have been introduced very recently. Can you try the below? > You may need to also patch "umh: fix race condition", because that's > another boot crasher currently present in tree. Not sure that that refers to. diff --git a/block/blk-flush.c b/block/blk-flush.c index 058abdb50f31..ce41f666de3e 100644 --- a/block/blk-flush.c +++ b/block/blk-flush.c @@ -169,9 +169,11 @@ static bool blk_flush_complete_seq(struct request *rq, struct request_queue *q = rq->q; struct list_head *pending = &fq->flush_queue[fq->flush_pending_idx]; bool queued = false, kicked; + unsigned int cmd_flags; BUG_ON(rq->flush.seq & seq); rq->flush.seq |= seq; + cmd_flags = rq->cmd_flags; if (likely(!error)) seq = blk_flush_cur_seq(rq); @@ -212,7 +214,7 @@ static bool blk_flush_complete_seq(struct request *rq, BUG(); } - kicked = blk_kick_flush(q, fq, rq->cmd_flags); + kicked = blk_kick_flush(q, fq, cmd_flags); return kicked | queued; } -- Jens Axboe