Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp947221ybk; Sun, 10 May 2020 01:27:26 -0700 (PDT) X-Google-Smtp-Source: APiQypLiZPxMYYu/WSd/pxVk5czEtAxJ/Iw3qCZhw88nPGly620A+TctgaHVtNVF4OzokSiNeC8q X-Received: by 2002:a17:907:2098:: with SMTP id pv24mr8970653ejb.22.1589099245898; Sun, 10 May 2020 01:27:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589099245; cv=none; d=google.com; s=arc-20160816; b=ZouXWiX28uniA2f1wp5Me4kQVUsRIoyUlh4mFgvy4WRIXNx6KIPnQyiHd+Mw+1tnnP jC38kziTuUnsOBUHhiPMZS3EgTS3RJmlp2VEhm8FQIRBbB4tWipBBno2D0QVV+parxEz pW8bqr7XjNlo5Ksbw4OTPQcLt/mTKHSCRqwjBjYR1yfK/mXhDsv+4sfOeI6NzBrBBGpn 1w+bGoGLE9c22uJDPfIRtIwz6T4cAzxHuOcMMfqlL1WvDyqb/fAwf2I0cSc3LRc/1P3a pJeZWJGVditzd7BlfOSJYq+hK5JYElSolGneGPpdKLlifuBLyTV9LpvHty0xyNoZnLJR OtPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:message-id :in-reply-to:subject:cc:to:from:date; bh=RRutGYAtIfBOnjx9uE+z5n+5PhhvyyFkJvRjcYViMy0=; b=JOIWJUYhd90dwMT5FKku2qqCmRNPQ6ombcKsLNVInWDQzhHb+PKlPmYLEGxr9FQCxM njioyghrlTFsCUyMeWXecW2xMElZWJ9dP4+jXiF/EohBByf0FpLHfUfoI5a+BkoribAT YOeBJpaXcd4ct8fDHG6uY1O+A98p2PWrvrDWB4lql+RzLhLEsk/GfKqQOfbp56SKPwo0 PoVX3amD2OudIeBGlgLB0CARPs8no3yr2mE2F+Te8T0qtRAZM9FRLZST3fQNpir/6GmW RKQUA1O6uMx+6S67/3k9lLsO4ZAN2sedaA2Ie2E+709ZqG8dscNWY2RY2XlaCTzS7x03 N0Sg== 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 y4si3897073edv.549.2020.05.10.01.26.59; Sun, 10 May 2020 01:27:25 -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; 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 S1728812AbgEJIZd (ORCPT + 99 others); Sun, 10 May 2020 04:25:33 -0400 Received: from kvm5.telegraphics.com.au ([98.124.60.144]:48036 "EHLO kvm5.telegraphics.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726345AbgEJIZd (ORCPT ); Sun, 10 May 2020 04:25:33 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by kvm5.telegraphics.com.au (Postfix) with ESMTP id D43A827747; Sun, 10 May 2020 04:25:29 -0400 (EDT) Date: Sun, 10 May 2020 18:25:36 +1000 (AEST) From: Finn Thain To: Markus Elfring cc: Christophe Jaillet , netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, "David S. Miller" , Jakub Kicinski Subject: Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths In-Reply-To: <9d279f21-6172-5318-4e29-061277e82157@web.de> Message-ID: References: <9d279f21-6172-5318-4e29-061277e82157@web.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="-1463811774-1457853207-1589099136=:11" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---1463811774-1457853207-1589099136=:11 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Sun, 10 May 2020, Markus Elfring wrote: > Christophe Jaillet proposed to complete the exception handling also for t= his > function implementation. > I find that such a software correction is qualified for this tag. > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/D= ocumentation/process/submitting-patches.rst?id=3De99332e7b4cda6e60f5b5916cf= 9943a79dbef902#n183 >=20 > Corresponding consequences can vary then according to the change=20 > management of involved developers. >=20 Makes sense. > > I think 'undo_probe1' is both descriptive and consistent with commit=20 > > 10e3cc180e64 ("net/sonic: Fix a resource leak in an error handling=20 > > path in 'jazz_sonic_probe()'"). >=20 > I can agree to this view (in principle). >=20 > By the way: > The referenced commit contains the tag =E2=80=9CFixes=E2=80=9D. > https://lore.kernel.org/patchwork/patch/1231354/ > https://lore.kernel.org/lkml/20200427061803.53857-1-christophe.jaillet@wa= nadoo.fr/ >=20 Right, I'd forgotten that. Do you know when these bugs were introduced? > > Your suggestion, 'free_dma' is also good. >=20 > Thanks for your positive feedback. >=20 >=20 > > But coming up with good alternatives is easy. >=20 > But the change acceptance can occasionally become harder. >=20 The path to patch acceptance often takes surprising turns. >=20 > > If every good alternative would be considered there would be no=20 > > obvious way to get a patch merged. >=20 > I imagine that some alternatives can result in preferable solutions,=20 > can't they? Naming goto labels is just painting another bikeshed. Yes, some=20 alternatives are preferable but it takes too long to identify them and=20 finding consensus is unlikely anyway, as it's a matter of taste. ---1463811774-1457853207-1589099136=:11--