Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp466303pxu; Tue, 5 Jan 2021 16:48:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJzctc+t1OROiSjTWOb2dO4g6C/d8EUpweYVw4iOGt73oQ9w0F8oLl/SAsFOja6ex6b8UPJz X-Received: by 2002:aa7:c698:: with SMTP id n24mr2195213edq.277.1609894097505; Tue, 05 Jan 2021 16:48:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609894097; cv=none; d=google.com; s=arc-20160816; b=ztEho4abvLbS36emUHQuGcuW6YYBQ+iMLzfgidNETPP3DGJ/0fTF7x3vCwwOXR5jLp Jb++kPz4Avkq/CrTYuql/mIh9d+LayRvhD/h9QLeLWXDNMWf/PN+OmIJelndvplrlIJm XHPMRvGWYglKtFgjT8sjuk3i96Opk5scj0Zsdu4gu9RLCFrW0OfbudR5Z1KP7XNUOJHG mgDwucXlta5uGhncB+AtrTjfjV+TEadfilfveBuDLG/Y3lWKJwkCJpvrSnBLJm3rKuqW y0jO4D9jaNysToM2uBbu34u1+uInUVhXR20qLxXt3xUZr8H6yXh7GE+hHNLO7Yy5K7rI qZcQ== 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 :references:in-reply-to:from:subject:cc:to:message-id:date; bh=o5b5Yq4Jc1nYwnrXSJnuOzJ46d9uYsxDa2eCnTlaJBU=; b=JCDRYcZKsK6CajuNwvl8QaNu8pBD49kaFaf86i3QlL5Ih9hr4duE82L8/3y9xCtjcW eKHleOtrQy92/dyLLW81PSLyPBge0mhaindiv13w257zC68ZbeyC2g5DdoYRB+w3LA47 nuSkwzNl0zaZ9+hhr5fUjWhElUDTGPb95fPad+HTQb4gTEniPn4IrFxpyRT/swrrOFi0 awFcay3Xo6P0SXCnNS+nv3QIdYo4jVGpQi3tfDmlj4Ph4CsHvJ7TQkQVA8O0VynHg64X Hz8mssjX/6CVS/ts3TyBoq0gryNZcACMwnk+QFwgr29qngVACIGlibXdctSevMTtlC7v oMCg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ss12si313695ejb.55.2021.01.05.16.47.54; Tue, 05 Jan 2021 16:48:17 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726363AbhAFAA7 (ORCPT + 99 others); Tue, 5 Jan 2021 19:00:59 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:51982 "EHLO mail.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726303AbhAFAA7 (ORCPT ); Tue, 5 Jan 2021 19:00:59 -0500 Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) by mail.monkeyblade.net (Postfix) with ESMTPSA id CC0494CE685B7; Tue, 5 Jan 2021 16:00:18 -0800 (PST) Date: Tue, 05 Jan 2021 16:00:18 -0800 (PST) Message-Id: <20210105.160018.901800594374682376.davem@davemloft.net> To: fthain@telegraphics.com.au Cc: kuba@kernel.org, christophe.jaillet@wanadoo.fr, tsbogend@alpha.franken.de, chris@zankel.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 net RESEND] net/sonic: Fix some resource leaks in error handling paths From: David Miller In-Reply-To: <529006a7dcd2cd345c2261d4beae0960880f4828.1609633586.git.fthain@telegraphics.com.au> References: <529006a7dcd2cd345c2261d4beae0960880f4828.1609633586.git.fthain@telegraphics.com.au> X-Mailer: Mew version 6.8 on Emacs 27.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (mail.monkeyblade.net [0.0.0.0]); Tue, 05 Jan 2021 16:00:19 -0800 (PST) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Finn Thain Date: Sun, 03 Jan 2021 11:26:26 +1100 > From: Christophe JAILLET > > A call to dma_alloc_coherent() is wrapped by sonic_alloc_descriptors(). > > This is correctly freed in the remove function, but not in the error > handling path of the probe function. Fix this by adding the missing > dma_free_coherent() call. > > While at it, rename a label in order to be slightly more informative. > > Cc: Christophe JAILLET > Cc: Thomas Bogendoerfer > Cc: Chris Zankel > References: commit 10e3cc180e64 ("net/sonic: Fix a resource leak in an error handling path in 'jazz_sonic_probe()'") > Fixes: 74f2a5f0ef64 ("xtensa: Add support for the Sonic Ethernet device for the XT2000 board.") > Fixes: efcce839360f ("[PATCH] macsonic/jazzsonic network drivers update") > Signed-off-by: Christophe JAILLET > Signed-off-by: Finn Thain Applied and queued up for -stable, thanks.