From patchwork Tue Jul 31 16:39:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 10551055 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9D1DC13B8 for ; Tue, 31 Jul 2018 16:39:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8DD992AFF1 for ; Tue, 31 Jul 2018 16:39:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81F0C2B020; Tue, 31 Jul 2018 16:39:11 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham 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 2988C2AFF1 for ; Tue, 31 Jul 2018 16:39:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727307AbeGaSUR (ORCPT ); Tue, 31 Jul 2018 14:20:17 -0400 Received: from mail-qk0-f196.google.com ([209.85.220.196]:46717 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727135AbeGaSUR (ORCPT ); Tue, 31 Jul 2018 14:20:17 -0400 Received: by mail-qk0-f196.google.com with SMTP id 191-v6so4715466qki.13 for ; Tue, 31 Jul 2018 09:39:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=93Lzbb71Um9iy7cvpnPL2/U5gIkaopYVhymW2QhiPoo=; b=iV7hQoJXM068QAvPa7NILMB+rjTwTgP2RTkN3aCmX7KMvL1cizBr0MNrVeKqk119dV ry24CbWAd2cTMMr+6yyT0bPgcQZmUWM45Nuq2GkQPyR3Y2lcI1292RhLgSCzGOkjGG9I lrk3sC45cNtDrPb6KUdAvjqeSIBek0WasL9acC+ONNAu3f6KGSVxuL4a+OyqP/pE6C+Q YeeyR0Bw1sF2sNDWNor9RlQUpmIgNNsjcjQlYyIVO1bi35B96y049pJ/OnPYdtq404Na gG6E/R67qoKd6gqTdm1x7Jkil/e7mFGaqfOrO+Uwwan62JIzEStWA4VwYxU07Qjbuojx R7eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=93Lzbb71Um9iy7cvpnPL2/U5gIkaopYVhymW2QhiPoo=; b=JzAk76neg2GIyVeDKsFjf3YSVxgtJ4KbOVZDZF3n5eyuGB8MG3K77S+ZxoL14Nt+ma iEMFDJ/yT1XemGD+4ZDcaB1hRDvlFVYXaKo49Ierrs51ytzQgUA789Ko7hH98ndwUgYv im84/Vszgrpzzely2fDyM67Wz9Tm4TXv1Ww7fNTeGtngiapb+71tUhldF9ZOPrvlJC89 Il6Ma07grOV4M91uUD1m21uN9I+5cnzjb8U334EqmFOz1UPjA8DRRHgpdd+YwQHtwUJp eNevU9l07oEUhHn6idYtq81jZZoe4AX/X+erIWZFL1FMYSooDZIpo7mO04gA1ivu5hIq SIfA== X-Gm-Message-State: AOUpUlHUlsvOMmKWwm8NL0LZIBEsxV5biHy7L4zihl9jC69O9PEVcsYx KiLTkjzHT0ilxjefwUTkLgDlo4btKzw= X-Google-Smtp-Source: AAOMgpelGz/oXeINH0lyN3fhGJzqzwMHSiYoEFsDgwan1bj9QKsctpeht8T8e0WajlgjH0g/xtt4Yg== X-Received: by 2002:a37:c249:: with SMTP id j9-v6mr20868506qkm.157.1533055149114; Tue, 31 Jul 2018 09:39:09 -0700 (PDT) Received: from localhost ([107.15.81.208]) by smtp.gmail.com with ESMTPSA id o29-v6sm16300513qkh.85.2018.07.31.09.39.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 31 Jul 2018 09:39:08 -0700 (PDT) From: Josef Bacik To: axboe@kernel.dk, linux-block@vger.kernel.org, kernel-team@fb.com Subject: [PATCH 1/3] blk-iolatency: fix blkg leak in timer_fn Date: Tue, 31 Jul 2018 12:39:02 -0400 Message-Id: <20180731163904.21856-2-josef@toxicpanda.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180731163904.21856-1-josef@toxicpanda.com> References: <20180731163904.21856-1-josef@toxicpanda.com> 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 At this point we have a ref on the blkg, we need to drop it if we don't have a iolat. Signed-off-by: Josef Bacik --- block/blk-iolatency.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-iolatency.c b/block/blk-iolatency.c index bb59b2929e0d..b0dc4fc64b3e 100644 --- a/block/blk-iolatency.c +++ b/block/blk-iolatency.c @@ -627,7 +627,7 @@ static void blkiolatency_timer_fn(struct timer_list *t) iolat = blkg_to_lat(blkg); if (!iolat) - continue; + goto next; lat_info = &iolat->child_lat; cookie = atomic_read(&lat_info->scale_cookie);