Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752588AbeAIJ23 (ORCPT + 1 other); Tue, 9 Jan 2018 04:28:29 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:37316 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752561AbeAIJ2R (ORCPT ); Tue, 9 Jan 2018 04:28:17 -0500 X-Google-Smtp-Source: ACJfBosMaDZtIYeUN1xozPRaV7YABqEdyBhvHEZ4TymiPwVUF2DPzHjFxM86jklnfc/EjBx8fs+f8Q== 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 V2 2/2] block, bfq: release oom-queue ref to root group on exit Date: Tue, 9 Jan 2018 10:27:59 +0100 Message-Id: <20180109092759.5454-3-paolo.valente@linaro.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180109092759.5454-1-paolo.valente@linaro.org> References: <20180109092759.5454-1-paolo.valente@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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 -- 2.15.1