From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF677C433FE for ; Thu, 21 Oct 2021 17:42:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BCFFC60E97 for ; Thu, 21 Oct 2021 17:42:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BCFFC60E97 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=t/TZvYshcK/2gXJof+NwtUXr3ddeQj6nv26noKIRwAg=; b=SkOaO2FwGGhzTo khoXf9i2taWN9sasQ8/OkLhsmyuAYEORB4yBC65h58GQFLiu+l7wJ1Hm0IpzK8+0H1B2ew4l6DTRM T7SCeu9gcfCJBw7zx2sKh2ILarFHNjfP3K5J9ZxPctMHxhBrkr21M93Q87XAHDHjnLPvXYtL8mOpu J4Ft5V3lZXec8+dTFXsg2jGyGmHZpNDaLkcKyyvtEN5lfNBUCFTYmkG+TiJqkUkOJ0pxHHVLYIv6N U+DavMdz7dDPhhE6ky4hBohPIPB7vEUpE+VGeweizcIWkWCXubgvkQuSGBx8pD7g75v7cb/tMPcda SxSstqr393OC7AOrDI5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdc41-008Vpp-JS; Thu, 21 Oct 2021 17:41:13 +0000 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdc3x-008VpH-L3 for linux-arm-kernel@lists.infradead.org; Thu, 21 Oct 2021 17:41:10 +0000 Received: by mail-pl1-x629.google.com with SMTP id y4so967903plb.0 for ; Thu, 21 Oct 2021 10:41:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=wjkL1M46brws6JUD91gGE9nrGWZDkt+GYrNQD2kz+m8=; b=ULa4ja1DxUaFql3k+NQDCw+GE2tpfakdVAljWPOrsJt+NBoKh2f0DItAwN+jUjcY9H k7f7DrbEPoc5UN8pYBiaqYbke7pcEn1DMauH0T0Ozx+VmGDCkAMiHn0TQ2tG7UjBtrFx 9V+oMoju8QLX/0Suel9ZUv/MtxBB6vrcNFTZ3rvYi8y9DCcYK8m0fXSf4PTTFdn9lrGt ZM06avbr5hktRf4yQhFqbmVrXIhYOHzZPfUVE3VP7rEgXftCZfEW6XFGMJKeR1eW9wkr Xjomjtxng2cHkzCxpvZXN2U4WHjaamfIwDsIbKUD8xb4KruX4GVJxQI9PiBSnCS0Bb+R 4p7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=wjkL1M46brws6JUD91gGE9nrGWZDkt+GYrNQD2kz+m8=; b=yxVWAMG8TxoYSvGLmoy2daqrm5yrATCo84Vkr4YluAEZwq3GWG2wvSE6RrT/NLpQuF DcBm9CnE8XDMuuHt/jToEB718cc/45xah1xY7rKemBFQqm/jiGKhq5CyloZnZ/l6T9sA DoNwgVnlW3sQjZWtKHp6QVSI/T7mc3N6KhMcBwdwke3eo8j1Il3hk9QFE0iUaYALh4Yh n0MnAzHP1//s+3HMTJsZBD5rK0xNNw2J3y3BjZInRJRu3rZGoo1i//4ZOdmVkDMU4+sy Xwvxr2bGUl+DRErbzA8Zt5p+OLTtMlm7QAcShTaZV0tFJnxOLv0/JXANe16uEHHodC9N QBpg== X-Gm-Message-State: AOAM532gn/8HZHBtYSpDOKg4ggUJ6Jj9ggv/5yjonJKfV5zkC3HlOd4L CXgvJL6ZzljQfeJzxQvKBpEjRg== X-Google-Smtp-Source: ABdhPJxGEHVTaXW2f3YMcR46zLfjucO2r8CQ5ZA6JjPFnpwZqgXAXBzuizFsKcn3wHuyk/O8urgm7Q== X-Received: by 2002:a17:902:c206:b0:13f:68f:675c with SMTP id 6-20020a170902c20600b0013f068f675cmr6666969pll.8.1634838068394; Thu, 21 Oct 2021 10:41:08 -0700 (PDT) Received: from p14s (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id s25sm6572669pfm.138.2021.10.21.10.41.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Oct 2021 10:41:06 -0700 (PDT) Date: Thu, 21 Oct 2021 11:41:04 -0600 From: Mathieu Poirier To: Christophe JAILLET Cc: ohad@wizery.com, bjorn.andersson@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, hongxing.zhu@nxp.com, peng.fan@nxp.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] remoteproc: imx_rproc: Fix a resource leak in the remove function Message-ID: <20211021174104.GA3562838@p14s> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211021_104109_724877_82FB5421 X-CRM114-Status: GOOD ( 20.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, Oct 16, 2021 at 08:44:28AM +0200, Christophe JAILLET wrote: > 'priv->workqueue' is destroyed in the error handling path of the probe but > not in the remove function. > > Add the missing call to release some resources. > > Fixes: 2df7062002d0 ("remoteproc: imx_proc: enable virtio/mailbox") > Signed-off-by: Christophe JAILLET > --- > This patch is speculative. I'm not sure if the added function call is at > the right place in the remove function. > Review with care. > --- > drivers/remoteproc/imx_rproc.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c > index ff8170dbbc3c..0a45bc0d3f73 100644 > --- a/drivers/remoteproc/imx_rproc.c > +++ b/drivers/remoteproc/imx_rproc.c > @@ -804,6 +804,7 @@ static int imx_rproc_remove(struct platform_device *pdev) > clk_disable_unprepare(priv->clk); > rproc_del(rproc); > imx_rproc_free_mbox(rproc); > + destroy_workqueue(priv->workqueue); This seems to be the right thing to do. Peng - please review and test on your side. Thanks, Mathieu > rproc_free(rproc); > > return 0; > -- > 2.30.2 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel