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: 10151225 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9B2B560223 for ; Tue, 9 Jan 2018 09:18:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F374201F5 for ; Tue, 9 Jan 2018 09:18:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 940EB28686; Tue, 9 Jan 2018 09:18:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4AC4D201F5 for ; Tue, 9 Jan 2018 09:18:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751819AbeAIJSA (ORCPT ); Tue, 9 Jan 2018 04:18:00 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:42467 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751444AbeAIJRp (ORCPT ); Tue, 9 Jan 2018 04:17:45 -0500 Received: by mail-wm0-f66.google.com with SMTP id b141so19063830wme.1 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=TYB3q3wcTHhNIpPLTUoaD4CiKKA1CN6okQg0chup/WERorr4FAYPCSBUtxry7r0JQZ j6uqOi4D7b+4FmrqNWFkSXIOOY+Hkv8CPvMs2FP9aD6ldZGuLtBMlHAWJKSz0GcS0CiW +CuNzPJOkchdSjBNzdPJAfL2HZUZIYv9YbjQW/9+BhjymaPDfIQlS4n74K2uEAbnhNHC 6BEQVNvK36Y7oi2mrRuKUHla7V/TF3d7YyaYj4YlpcZpU7hOa1Q0OEGBQI2fTjdGkLlz d0U9AD2XwzU84yrf0Ju1sG+AfIPqb9mFYUgJP1tCT0+k0zJKX3sg7MaPAsRQr6ZL3SBX OWcA== X-Gm-Message-State: AKGB3mKQkDGtLOMw/YaGaQbxPSwDZvAV3SWkFo1xSk9gRYP3yk5Y7q+y 8zh9EW6sO2EPQ3WG+iyUEQT/eA== X-Google-Smtp-Source: ACJfBos2jOjN50GDrEs37A6AlG9UlY04S8stBc4nFGxNQGzkmK+WmTq9zQQgtYJj6bIsKBBEdLQz3w== 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-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(+) 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