Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4252865pxb; Mon, 25 Oct 2021 00:07:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywYmWLXsZnzrzPWGIrrLLabVbB7QBeLBUeYIQIfzn+ozndqWpGwEIqEtXW2uQ/EHRoN4xt X-Received: by 2002:a17:907:2d89:: with SMTP id gt9mr21074026ejc.430.1635145622761; Mon, 25 Oct 2021 00:07:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635145622; cv=none; d=google.com; s=arc-20160816; b=RtPi/FPU8N0jVNRroVQftu0Nv5bxWDEJziSeFaYLYtCRCsHhL+xw118AfeMFGS2Bk9 63+fKfTN0qyDhGFhES9qb8TFdT1RbQ4ySnlRuVM6486CR0S4hV9bX3oknNjjw9g7V6IJ j6u+swmjMEYCX7p0mFexaE7AO594yXLgWVFk+YvV8JQOaXMHGqTLGFtTahzTrli2eolp IW2PA2qRiB69IJhKweFVA+m5TWjdjvk6JCJSyLGFT0ygoeIpfEsO0MBSE7ZOIXN+0QZF zk5WKDsPVX8JPvr6XU3VGQhAuTysgIexTIkXN7nwO6zyr43uj3rcMoH7qmHRhN+nFVyW Tvhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=yIZm+bpQkxm0kkpc3dZFmgTspEOdtZaC3LvhG9CLTIA=; b=Nm0EJxVOXch2Ic+V8O+lBBN7ZqhCaoJ2fJ+Ec3hV/exXBc2PGnyLhf+KUzsiU9mR9t VpUB223g0Zbp+636AYGRMnQcdLRVWVq87EzaN/TbHkI1xiuPqNNv20XhcASKJK0OU/wE zfiX59RoKBjtYyjKRjZHIWfdUp6T/Cw7eN5g9wtny+RtyE93Y+wvgYHr+2lP+nemB/35 Hwu0TiHm/sWomF2wShlrVK4TGFCPn9qTr3xQAb4ZI+ncoaQ3ei+poF02c6oDTZ8N7WDY SuPySfcOjtBjuOVqGW1lCV5NghL2V7BPBTzHw1vnryWBRLP0h4viVrPY7FcoKLqmWuNi E1Aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XKXU+FAx; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id su6si8000046ejb.336.2021.10.25.00.06.39; Mon, 25 Oct 2021 00:07:02 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=XKXU+FAx; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230395AbhJYGqE (ORCPT + 99 others); Mon, 25 Oct 2021 02:46:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:48958 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230085AbhJYGqD (ORCPT ); Mon, 25 Oct 2021 02:46:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0245560D07; Mon, 25 Oct 2021 06:43:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635144222; bh=RbwsxV+7EA5MhdQjqbFs6xSGFLNYiYd3zcPW90AMfMk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XKXU+FAxQLfXB7BKAcCLnmpKCftbziXJuDutSW4WVXuBhcmiL3DLSJGTDryFTWL5z yuDyZQe4ey6XZbGqz8XLhcZwnoNQq+I0srP83Umuya0jk29q0FY469mIR+uqOAB7HC HA0KP2ZEcgOf0C7Sk9EG5q7Tfzi1MwWbbGsZWt4infbhh3jBiKSWBHBY+rnRC/qLN8 20Aqx91BZGQOuPAQps/1OaEflnZD4KG3y4KlSA5mDj2M00nSPY+op9qnXY0tcoWMJr VqT6452+hoBeCKk+HV6sNxuv+stMh10W2cyS+pFMUxcT4ghdLoLDDUrFrK2zhNooNL bgWG34F6He0vQ== Date: Mon, 25 Oct 2021 12:13:37 +0530 From: Vinod Koul To: Xin Xiong Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, yuanxzhang@fudan.edu.cn, Xiyu Yang , Xin Tan Subject: Re: [PATCH] drivers/dma: fix reference count leaks in mmp_pdma_probe Message-ID: References: <20210911070533.3114-1-xiongx18@fudan.edu.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210911070533.3114-1-xiongx18@fudan.edu.cn> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11-09-21, 15:05, Xin Xiong wrote: > The issue happens in an error handling path. If > of_dma_controller_register() fails, the function simply prints error > messages and returns error code, without decrementing the reference > count of pdev->device incremented earlier by > dma_async_device_register(), which may result in refcount leaks. > > Fix it by invoking dma_async_device_unregister() before returning the > error code. Pls use right subsystem tag, git log will tell u the same. I have fixe dit up while applying -- ~Vinod