From patchwork Tue Jan 9 09:17:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Valente X-Patchwork-Id: 123819 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp3788395qgn; Tue, 9 Jan 2018 01:18:02 -0800 (PST) X-Google-Smtp-Source: ACJfBov3bkVnwSoHcARj3FCCIQyM4jQisMiaX9G70iNO1mSKYyoKd82EKr2gFpiK+D0J0hJbXkyC X-Received: by 10.159.247.202 with SMTP id v10mr7814948plz.412.1515489482656; Tue, 09 Jan 2018 01:18:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515489482; cv=none; d=google.com; s=arc-20160816; b=D5fi+tnp4ONMlI39R5WfBU4sr7HdgBYA3fsa97AZmtdF0RdVREsNgGVQyHyQD6Co0B 4w9C3oqBLQg3Mn5moGoIcanCyNFkKUF7NIOC1FM85VJniFWu0yzkMz2oPrMirJ3h4mvr /a5pbXFuIx2ok9mDBV1dzKQc7VAd9R06RMtP7+NgNx+ZLMciA7liMrpPTjsSggSy4+pn cWPcxKLhjNI6EllCY/ePGNdRCSEJBjxDqdsmRsRr0Vm4zznoFjxHrQgC+0zXgMXxYbPq 98tIto/j30hxpBZ54IvwoLt9fKByhzD7+XyKgRQQQ9DTcExoUi8bg0k+hIg6SWZNpUCs 6Cew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=HXbiwH/hQd6lJB2g00vxKJ1zfWW+jO65rSjxIZdwMfg=; b=Emb0myQj8DIfhAG6MtXLn1SJwnTmdWyU45yBv/gzeHck/W3kkcUwccShzei4KRetlR X4ucfvt3loYBaxIhfXmPxPf50BKA4ivJk8COa3G5idq2SxQNtL5NlnXlqetnRVAXxkvf q13tyobL0LESoElk1V5HgFySOWkZeOU76lsqPR5RumhJetJ9/AZMdlmGwtFKdjcAaqCW zJcqroAx7by0Yyg4ap5MF4BHlKetDQBCorkif1ctMIaYkJ84OYGWICmkmf/gECxd5L0a pzW0WAacUQwGOg+U2nT8+PiBwUhUDxxguLNt40bDM++ggvsybI156eCCgcbHPT7oyNWU egCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K7J33dry; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f12si8740418pgo.493.2018.01.09.01.18.02; Tue, 09 Jan 2018 01:18:02 -0800 (PST) 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=@linaro.org header.s=google header.b=K7J33dry; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751934AbeAIJSB (ORCPT + 28 others); Tue, 9 Jan 2018 04:18:01 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:44005 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751436AbeAIJRp (ORCPT ); Tue, 9 Jan 2018 04:17:45 -0500 Received: by mail-wm0-f67.google.com with SMTP id g1so1166232wmg.2 for ; Tue, 09 Jan 2018 01:17:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HXbiwH/hQd6lJB2g00vxKJ1zfWW+jO65rSjxIZdwMfg=; b=K7J33dryu2isnhEctAijjpWG5foj40Cma4nmzye7XWUntI1MgLuZoXW/2qyXbq/Yf9 hqFZvgEIXZ92GnqTYgtAagaFFzpfA65ouPY64cW52kCzzx1Q+alMTW2wtamkOQw7UhNU 0+gArk87O4u5k7G880wtIf6deZplJvTFzX3zg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HXbiwH/hQd6lJB2g00vxKJ1zfWW+jO65rSjxIZdwMfg=; b=DJIi6Pv0uPRLixFS5bB1BVxIOF5T9hLDUB44TQ517HaGMEFnKpkD8mrzKYmCyh3H+y f4qaWMFXxrI2sKudn2VK4BY9TXdaRO1l9lsoLKwFB8ZiIcs9cFwXgYNudigKlFlLv0O+ tfm+0Ot1J/GlHOK0jY738kCnt3MbvccRlmDev+xQnxTquyXykXo27Ed/GPc6uxa5ya20 Q9iKLEBKsprYJhN5WQ1fq/TRJkkzwg8CE/6NWm0MYg3P8Wmo6NwtBBuLo6wFk7e7lWk0 5JrZ67FCgplyhXJKgIWMjiBmPgoG+Q3Z4EG/xn7tXwYFxnlkVnpdEgU2uBZGJqb6+K2M 6N6A== X-Gm-Message-State: AKGB3mLtGBA2rC5UchhhoUThbi896gjmTNqTMAb98V6A7IMQhbUCwq7H GGaoYT1Um83cGM6G6PUbMrhJWw== X-Received: by 10.28.151.83 with SMTP id z80mr9979843wmd.99.1515489464050; Tue, 09 Jan 2018 01:17:44 -0800 (PST) Received: from localhost.localdomain (146-241-48-150.dyn.eolo.it. [146.241.48.150]) by smtp.gmail.com with ESMTPSA id y124sm14662722wmb.42.2018.01.09.01.17.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jan 2018 01:17:43 -0800 (PST) From: Paolo Valente To: Jens Axboe Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, ulf.hansson@linaro.org, broonie@kernel.org, linus.walleij@linaro.org, bfq-iosched@googlegroups.com, oleksandr@natalenko.name, 162996@studenti.unimore.it, Paolo Valente Subject: [PATCH BUGFIX 2/2] bfq-sq, bfq-mq: release oom-queue ref to root group on exit Date: Tue, 9 Jan 2018 10:17:27 +0100 Message-Id: <20180109091727.5262-3-paolo.valente@linaro.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180109091727.5262-1-paolo.valente@linaro.org> References: <20180109091727.5262-1-paolo.valente@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On scheduler init, a reference to the root group, and a reference to its corresponding blkg are taken for the oom queue. Yet these references are not released on scheduler exit, which prevents these objects from be freed. This commit adds the missing reference releases. Reported-by: Davide Ferrari Signed-off-by: Paolo Valente --- block/bfq-iosched.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.15.1 diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index ea48b5c8f088..c56a495af2e8 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -5015,6 +5015,9 @@ static void bfq_exit_queue(struct elevator_queue *e) hrtimer_cancel(&bfqd->idle_slice_timer); + /* release oom-queue reference to root group */ + bfqg_and_blkg_put(bfqd->root_group); + #ifdef CONFIG_BFQ_GROUP_IOSCHED blkcg_deactivate_policy(bfqd->queue, &blkcg_policy_bfq); #else