Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2245399imm; Sat, 9 Jun 2018 10:47:26 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLEi6U58CZyNRp7TB2DDM/puogZb2/ZOOq3+3okoRI24aDq+4fw6wrpNEgQgUqE/EztZ8uI X-Received: by 2002:a62:b509:: with SMTP id y9-v6mr10955055pfe.121.1528566446524; Sat, 09 Jun 2018 10:47:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528566446; cv=none; d=google.com; s=arc-20160816; b=U0EPTPmOsUfrX8f5pXwYXaYg71NCCp/t8HHjPGoe5ABRThQg6ccvUkmBCzR2CXo2oG E8IrnrnxL9Ud/G29qdK7eggq+DdssI3A6aaqkyjrTH4aVB/LJw/QdXl77HTUwDJtE8m1 CPnP9iarl59uRg+gP7VAGesRxf0kjV48ug97UixiyRQcv0RFohTgcEA7VkI68BaKMvqV O8klacdm49tTR4v2MdSorZqrxGtVHPxN8/BquX3TBnYSzDJEDMR0D2j6QbGNwNBXmw5c /9HBooImQh/kXUo72D5QIEdQPYus62edL4XOM8hPqPtlqHIp91SI/w4S/b7j1DAfr0EI lE8w== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=rxUrfD9Lw+DEJu8ZCfJ8fRDHc5WF+pDPf3wHWdCEehk=; b=UvoKfZDfFqCLZYyYb8DNvDj2jwaqWdpGZCGNHlMla6h6lj8uY+QG9/iLjvmYhw0WB0 JZPpl/Br3+VB2vJMdS+28xm04xEVmMC2MM8KBOTjTmC7sgxIbaFUB22LL4FjMM4uetKS 8nlz1gS+S2qN6ZTcjdYcsyQ5ElYvYzMxryWL9+crTCbR6dcsfONfpXdU1YNaoWuuOnab Rut6i5LJSIXVe+XPx5wuN5wk/gs4YoQehw/bvFpq6vBkl89F3g/+JxJAyEYcTGJKN11L 1bI2qFpVF1n5SQp0VIeuQ86wZKR+ahe5mPuv0kKRlQTJynD9ripRYhtaJYkaNPKgi2OB 7jbg== ARC-Authentication-Results: i=1; mx.google.com; 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 q3-v6si5776937plb.238.2018.06.09.10.47.12; Sat, 09 Jun 2018 10:47:26 -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; 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 S932101AbeFIRqG (ORCPT + 99 others); Sat, 9 Jun 2018 13:46:06 -0400 Received: from tartarus.angband.pl ([89.206.35.136]:50510 "EHLO tartarus.angband.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753342AbeFIRqF (ORCPT ); Sat, 9 Jun 2018 13:46:05 -0400 Received: from kilobyte by tartarus.angband.pl with local (Exim 4.89) (envelope-from ) id 1fRhw8-0001pY-Uv; Sat, 09 Jun 2018 19:46:00 +0200 Date: Sat, 9 Jun 2018 19:46:00 +0200 From: Adam Borowski To: Jens Axboe Cc: Dmitry Vyukov , linux-block@vger.kernel.org, LKML , Linus Torvalds Subject: Re: mainline boot is broken: KASAN: use-after-free in blk_flush_complete_seq Message-ID: <20180609174600.enboaxbsqhgjydt5@angband.pl> References: <1d8de494-0a52-33f5-4c8d-0ec08cfb101c@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1d8de494-0a52-33f5-4c8d-0ec08cfb101c@kernel.dk> X-Junkbait: aaron@angband.pl, zzyx@angband.pl User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: kilobyte@angband.pl X-SA-Exim-Scanned: No (on tartarus.angband.pl); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 09, 2018 at 06:33:06AM -0600, Jens Axboe wrote: > On 6/9/18 3:34 AM, Dmitry Vyukov wrote: > > 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? Helps on my setup. > > 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. I for one didn't trip into that. > 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; > } > Meow! -- ⢀⣴⠾⠻⢶⣦⠀ I've read an article about how lively happy music boosts ⣾⠁⢰⠒⠀⣿⡁ productivity. You can read it, too, you just need the ⢿⡄⠘⠷⠚⠋⠀ right music while doing so. I recommend Skepticism ⠈⠳⣄⠀⠀⠀⠀ (funeral doom metal).