Received: by 10.192.165.156 with SMTP id m28csp1137014imm; Wed, 11 Apr 2018 13:07:45 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+ZykmE5tJTL3e8mRETgFc0qd87gAzuIJZjF8pmyyqB/gdbWcQy6V0x+nvAp7O3KW3bNs1N X-Received: by 10.101.91.133 with SMTP id i5mr4462308pgr.249.1523477265102; Wed, 11 Apr 2018 13:07:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523477265; cv=none; d=google.com; s=arc-20160816; b=VG9pioxMVXtDy5ycjEHGkWmJEmQuCF3xEMy+A/0/Lk6EYMZS2F2fdGeXnRjpFnDRgp GlnSxYNOREl9Mg6lz7wBuwai1qtqSc2U8iP/yUa/9rjgX2O4SBnH0y/dUNm6UIrR+dKL yVLwgmUWkHBHVkV9P9VRlZaFc/5Qkosa015To79T8zPilqVNjBKe5cwZRVnv3bgKO4kx 6yEwriF/Uyb8jZh5TrCsMHuVYszH6FkwF648kYfhnGO2858quJkyKp1UT5FoCEAAyWn/ Vfl3K2+nUPoAxo0XfTlLTgMzqmkm4MI4ITTO5mWhNE0i23lMgdAYP35+6TixYPX/2p3X JKzg== 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:arc-authentication-results; bh=3YblijLOLfe55AXEfCl6feQPQFwBPib9WExUPz/7CGg=; b=QZnYhblbIp2HY51r5lZlOWNW6Ak0Ws7cOmyFXuEiBKn4fOMpHbQkwdzWPFhxU8E+3N QmKMHp4ZjzrJD+0EJcE2c9VyLQHM7o2wntp4VQbb/fY5Q2tIwS3EKuvIakCflFYk+h4h E0d7f6jkTHOGMC9S+9SXU6VFx2OUPnqFdyBTS34jJFI+1sUMAw7m7z6BLq4VkXjq1FVG 4U0ofFt3htQmMA4b//euHSRNCevB2hG80XkMU9PGVp22HYThDh0R5YeCwRODrRftXKql I0j0TS0r5imDK8eCtuSDZ30l+t7Is4kzvzksd/vHBE/Zs6BoqKOgKNBVUwqLu3Y+Rpb1 C+JQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=qk2/T0Kx; 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 e4-v6si1638545pls.268.2018.04.11.13.07.08; Wed, 11 Apr 2018 13:07:45 -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=fail header.i=@gmail.com header.s=20161025 header.b=qk2/T0Kx; 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 S1757062AbeDKUCv (ORCPT + 99 others); Wed, 11 Apr 2018 16:02:51 -0400 Received: from mail-yb0-f193.google.com ([209.85.213.193]:33349 "EHLO mail-yb0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756373AbeDKUCs (ORCPT ); Wed, 11 Apr 2018 16:02:48 -0400 Received: by mail-yb0-f193.google.com with SMTP id f5-v6so1064026ybg.0; Wed, 11 Apr 2018 13:02:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=3YblijLOLfe55AXEfCl6feQPQFwBPib9WExUPz/7CGg=; b=qk2/T0KxQJIMKSVng9OzDyvyXr2X/4K9s1yrZEcI6URzPmFC2sDxh1bpl2hyRU5xJm GcGJF7k0E6MDsui/nO/fGj3bSbfcC/dff2Jm3LORlMfP6V6Fj1WFg3YKTvgxUmQGpBmd Kw0WmUk6bBytFD7OPLxFD3IP8IXc36/sUn/uSgICR8gepRZEIEN6zNWmsx+QYnkyvR49 Thv6Wi+N8i/iM2ldkjNmuzE3797dsmFJB7hxLPjWQm60EqDD6cpDk7L3kDqZZrVvG7ma EiZaASQlhT4l8yqt2YFmROrG9k6solod6CPktqIGHvpXhmSYKaGfchbVGwwC8YcBAAAY mh1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=3YblijLOLfe55AXEfCl6feQPQFwBPib9WExUPz/7CGg=; b=e8l0CJIVUgaTVl8l+GDx4/36pIJRu9C5eWWfXJNNLcGeQNgdEsJACchspj5se4NqVa MsXkZNeQ7nhSx1CXopWDaAWZLkNlEKQWNxqOg7dVwssFr9pkZF/wMGaG4bK8EN96RSYl I678bOXrRHKacCJf1WbooghHsyvSx3teIFEnUmqiDfZnRUaKuGiMYr2/r0Y4+/uMAkkV WmxwUlCwkEmdt5nGEag9ry5nb+Ie3mFu+XCACeJNasxc1bl7ryTv8tR/jAdDtSalXoHH ayjUFTKcoeEtMmTiTMmTu7zMMkNdb8WbApa9konA5ATCgtj0980FSm7SMwg9BMdy5tut Wghg== X-Gm-Message-State: ALQs6tBhGB8PCXl3ptyegg1kKxj2DP7c+jzd5dGn7j/KRCuL449W5W6D /2szJi60/q3OWWUZAz6BT5E= X-Received: by 2002:a25:42c4:: with SMTP id p187-v6mr2803872yba.126.1523476967848; Wed, 11 Apr 2018 13:02:47 -0700 (PDT) Received: from localhost ([2620:10d:c091:200::1:e6ed]) by smtp.gmail.com with ESMTPSA id d202sm750889ywb.105.2018.04.11.13.02.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Apr 2018 13:02:46 -0700 (PDT) Date: Wed, 11 Apr 2018 13:02:45 -0700 From: "tj@kernel.org" To: Bart Van Assche Cc: "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , "nborisov@suse.com" , "axboe@kernel.dk" , "shli@fb.com" , "gregkh@linuxfoundation.org" , "00moses.alexander00@gmail.com" <00moses.alexander00@gmail.com>, "joseph.qi@linux.alibaba.com" , "arnd@arndb.de" Subject: Re: [PATCH v2] blk-cgroup: remove entries in blkg_tree before queue release Message-ID: <20180411200245.GQ793541@devbig577.frc2.facebook.com> References: <20180407102148.GA9729@gmail.com> <20180409220938.GI3126663@devbig577.frc2.facebook.com> <20180411101242.GA2322@gmail.com> <20180411142019.GG793541@devbig577.frc2.facebook.com> <20180411142859.GB2322@gmail.com> <5fafe1cbf6b0111448a81005c1c16feee24a99ad.camel@wdc.com> <20180411190027.GA21274@gmail.com> <20180411195700.GP793541@devbig577.frc2.facebook.com> <6e2d8be78572fef5fe8f2e0e7ecbdea5839dc198.camel@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6e2d8be78572fef5fe8f2e0e7ecbdea5839dc198.camel@wdc.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 11, 2018 at 08:00:29PM +0000, Bart Van Assche wrote: > On Wed, 2018-04-11 at 12:57 -0700, tj@kernel.org wrote: > > On Wed, Apr 11, 2018 at 01:55:25PM -0600, Bart Van Assche wrote: > > > On 04/11/18 13:00, Alexandru Moise wrote: > > > > But the root cause of it is in blkcg_init_queue() when blkg_create() returns > > > > an ERR ptr, because it tries to insert into a populated index into blkcg->blkg_tree, > > > > the entry that we fail to remove at __blk_release_queue(). > > > > > > Hello Alex, > > > > > > Had you considered something like the untested patch below? > > > > But queue init shouldn't fail here, right? > > Hello Tejun, > > Your question is not entirely clear to me. Are you referring to the atomic > allocations in blkg_create() or are you perhaps referring to something else? Hmm.. maybe I'm confused but I thought that the fact that blkcg_init_queue() fails itself is already a bug, which happens because a previously destroyed queue left behind blkgs. Thanks. -- tejun