Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3654136pxb; Mon, 24 Jan 2022 14:32:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJxhKjIUkSpMoDm+ueHasQVTyuTOYGwYE2322nLIwAAQC5DJfWgEbc7O9fAwOO6h0D88Ow3x X-Received: by 2002:a05:6a00:1944:b0:438:d002:6e35 with SMTP id s4-20020a056a00194400b00438d0026e35mr15857979pfk.20.1643063528136; Mon, 24 Jan 2022 14:32:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643063528; cv=none; d=google.com; s=arc-20160816; b=WBii7RwqO7+L/XTMyX/lHNKUucq3rQ33hbQvNOHrOWbwvxfFspjO03n3EC7woCefHs igmBbjjW+OgBiUh/H9OOK5/6SQZ4752YfNYybh1Va79mkrJ0l3YUcWTsF46thDdwQDA9 GPKYwsGpPS50hLxieLUcbqNQzfev7lJNYEn9ojFPcV8l/Dq2Rm+9jxycAo9TJTnMmkV3 BIwZiIpPcwuGLmok0elHUwK9blqMBFwBTnWdZDNJCL0mkCGcnWjd7Dl8KGNpZ9XRu1/5 Xr+Q8LiZXFwrfQDucNu6VJPN2axHvUhLaV/lqkgUrN6FoolmoczCOx9cdsIYKjRU7pI5 9Vsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SUDQQqpXdQv5A6oKlEw3gIpKIlDA0XSpb3whO3eNvjE=; b=qEzwwVUuwJXl+n3GJ2xNfvIFUFt76gQ6Ypa4H1bX5qGVupuDQKhUlQQvuO4yNYxcFJ sW1wzBMUYfG790a+su5BI/vgnooQ5KAlCc6BVvomueAhKO615Ow2O+Khs7mhUPJc5I9e oiAh95PJI7MKNpF/5lNlc3GYYQNsa2fO5mNEZlSOeclZcPadvXjm0K6VWDyDZoSb47Ss STEuaHUAVqBIqfiMmRi6dgzkTre9qPW8W/DcGwRUvi4lz6FncPsmsAINQVVx0CGp3p7y +M0xvPI7NL8RHrM0LtVBk3O9Fq9z7sLT6mIYk+kWxz/SedQQOQpYmy1/rV5ofluYVKDg cjTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="TQPehGL/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z21si491635pjq.133.2022.01.24.14.31.55; Mon, 24 Jan 2022 14:32:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="TQPehGL/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343620AbiAXW2v (ORCPT + 99 others); Mon, 24 Jan 2022 17:28:51 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:54704 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1455653AbiAXVfu (ORCPT ); Mon, 24 Jan 2022 16:35:50 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E3644612D6; Mon, 24 Jan 2022 21:35:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3A71C340E4; Mon, 24 Jan 2022 21:35:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643060149; bh=c+uXVpEUnHmPsK3iUyPSRcXmijXiLM2c/xPdjDxUO1c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TQPehGL/13D+lqZaEZLMCljDNvkN+5+JvfAqODoh49DAxAzdLShFzkDPlN2aNgJcC pPtEHsu+fPfSjt5DaxbRyRb8GT7Li1Ez0/imZZp+pIqpN7e2a7zhry9PxgoLUCk4SW LSHRF2VQ9V1h4cdz/ghGdGjrySMJDFghov7Gi4m4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Peng Fan , Mathieu Poirier Subject: [PATCH 5.16 0855/1039] remoteproc: imx_rproc: Fix a resource leak in the remove function Date: Mon, 24 Jan 2022 19:44:04 +0100 Message-Id: <20220124184154.023924763@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe JAILLET commit 4da96175014be67c846fd274eace08066e525d75 upstream. '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. Cc: stable Fixes: 2df7062002d0 ("remoteproc: imx_proc: enable virtio/mailbox") Signed-off-by: Christophe JAILLET Reviewed-by: Peng Fan Tested-by: Peng Fan Link: https://lore.kernel.org/r/d28ca94a4031bd7297d47c2164e18885a5a6ec19.1634366546.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman --- drivers/remoteproc/imx_rproc.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -804,6 +804,7 @@ static int imx_rproc_remove(struct platf clk_disable_unprepare(priv->clk); rproc_del(rproc); imx_rproc_free_mbox(rproc); + destroy_workqueue(priv->workqueue); rproc_free(rproc); return 0;