Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2458755rbb; Wed, 28 Feb 2024 02:25:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUtsZiwI1cZOGNsr1z5xk/7ON7/+H5mWUgawbq9eKgMuGR8KghnFe2+MOHqpk0TdTcXKSkxzz/Fk9gj1WAvbSTjj+oz1z/ku/+dTOhfzw== X-Google-Smtp-Source: AGHT+IFAO74muBudk/E5G5lzIL45eQ7bHKLHPIw1ciocizxfG+RqLfX/j1oq/YyfV5A2CZhocr8s X-Received: by 2002:a05:6902:2081:b0:dc2:3fbd:82fe with SMTP id di1-20020a056902208100b00dc23fbd82femr2351615ybb.46.1709115912393; Wed, 28 Feb 2024 02:25:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709115912; cv=pass; d=google.com; s=arc-20160816; b=pGjUd67L6RRx5/eVnClUoim812Fox1VpfE9puZCfs3ycscj+xmsbAP9Eu9OvTKn1he gr1PssWQEh4yo+cn8CRPfMyUYx1ZCape70hxfUHZvhzd2P1f+AfggNvNr1HXsRDGbMSA Hg2W0IUz90C60sNeXecJvoR8cUHiW4RDS31pSeWZBmTsboiA5FbgZGgpMfF2GZTFvhUt APkYO4epU4kMStg4umM0YVljZMEwkgv5sZYPB3ow2HSeJKHZSWJcEudMLEXtKwfWeS3U NyrxPllFzIcjBeecds/nx3LGy6K7xi58OWJNhaHgivVnxBn6PeTU34zxDrmKWgVxarRI aQJA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=RJWvUgHr8awlOHf5f+a2KBnaO6oNMg4fY/qdVUnzznE=; fh=QDYX0XFUouFY9tLkpr/Yh3j0xTowR+6Y2ldpiGN/AgQ=; b=OHlThH7ep6iAIOrKXQEXttjY/58Fc2WblYUB8FooCkLQvvbX5SE+Jqp0ZAXI1DkP9U L95M9Qblofe6K63wiRi5drdoA+r2emfmdpnXm6nAvjqF3rgvM/b/odXPRUPwOq7t1cgq Eb47LNOPO07xsz/WFDsfNTb7BPfkQxt9SgSokCkC/Sn3UtKD39tFsM5+Qe8OgozoN8yS XaXQPa4kWQxBlJC86ATUuwr/FrDK9alY97YHKlIKLuNuhkE2FNBti/9Nyko+b6m1whfD dnyXDV6YeRmSPFQlGnXn1NnwSImk6DSTea/O/knn3IJG9TTQ1MarP786nd7ALGwdfBFv a32w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@resnulli-us.20230601.gappssmtp.com header.s=20230601 header.b=VHLB0nZS; arc=pass (i=1 dkim=pass dkdomain=resnulli-us.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-84829-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84829-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d2-20020a05622a15c200b0042e8c83afe0si5766885qty.389.2024.02.28.02.25.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 02:25:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84829-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@resnulli-us.20230601.gappssmtp.com header.s=20230601 header.b=VHLB0nZS; arc=pass (i=1 dkim=pass dkdomain=resnulli-us.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-84829-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84829-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id CE3931C22366 for ; Wed, 28 Feb 2024 10:25:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C47A25677A; Wed, 28 Feb 2024 10:25:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=resnulli-us.20230601.gappssmtp.com header.i=@resnulli-us.20230601.gappssmtp.com header.b="VHLB0nZS" Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0370856765 for ; Wed, 28 Feb 2024 10:25:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709115905; cv=none; b=AJf4lm5Imw9JN5cQEdsrZvau2C2FU4k2N4108HuO0dO9lf1auCV0POnuAvnFSuF1Snkz6NmiQVhlA8MCEwEUQXkoUqGgFlmR6LL00JKOb0QTjjji4DK7j8IzFfLDP2UFwqKA9iLwoj5cwtCmmQmZOre2JWpkGk+fUQUfKp/aJPY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709115905; c=relaxed/simple; bh=RJWvUgHr8awlOHf5f+a2KBnaO6oNMg4fY/qdVUnzznE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QMLXmeoQ2fFnIl2vL6+x6EYq9trYs2U1Zjx3ZszTl268matIYnLp6DrQCVZX/L6l7Sv0JuoYWcj2q9pOQ7yv5nDBQmiZDmXao0UlgmLsOk72nLSdOzA7ijQcB9IBsG2PgB5GZoKvMJQUfk+4fQzJ7hKcgNBQ4nHrTx5w5MgVWNE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=resnulli.us; spf=none smtp.mailfrom=resnulli.us; dkim=pass (2048-bit key) header.d=resnulli-us.20230601.gappssmtp.com header.i=@resnulli-us.20230601.gappssmtp.com header.b=VHLB0nZS; arc=none smtp.client-ip=209.85.208.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=resnulli.us Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=resnulli.us Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-2d23d301452so72617171fa.1 for ; Wed, 28 Feb 2024 02:25:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20230601.gappssmtp.com; s=20230601; t=1709115900; x=1709720700; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=RJWvUgHr8awlOHf5f+a2KBnaO6oNMg4fY/qdVUnzznE=; b=VHLB0nZSyQaFKtZcmkt3np1G94/kCMT4QEtZ1pFMUERk0xrpuIB/cFHO3fGjlRzOP2 oPzD+8DH9HrM6ThX/bOOsq6ol5+/fZ4EzAiMfjD7TN2bC2b4a0f9oSIYEidetc7dvYXm LHmy3iZ85hsllimJ56Q4XeIdZRw+4XtGJCOlFSddkUfu8pJ7hsEkC8YrBoB8ClXV9FyZ rnVg9lleA486hOl6cyZb52Sw1VtTF9Cn+lIANYJUmkeF22AC7rs3muACZfI5sj6NmLL4 Bc6THhkHYFJce4Qv++qsTkeDdqTkLuYtS6pVv2T1Fq+0D9kckt0TssylpV33o8mP3aM+ 5xyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709115900; x=1709720700; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=RJWvUgHr8awlOHf5f+a2KBnaO6oNMg4fY/qdVUnzznE=; b=S6FPK/pbt+GfYZeQhXFfDubVYd7wS/sMaRlINBcH2rXpbyGNOeqfita4qqtW7AOPtN 9w0LHJxmhwIDskzh0EmeSFHZOen6AOuJAlW43ptI2h3YJ4A91i/dnvPGh/oS5ofXPvm4 wPA9qorm2cF1zISaa3ONNj6uDOLrMwuEOFOVZcK8ZqMPba79cCcHkra1h85F0BG9CT3d MBcgbcMvwtq8Tv0mxMAE4cslXx4iizIct5EiMuE8j5yvWl6fCSDnMZjx77qSqZ+hA9hq 4CmKUDb6Iu1TYvGwRh4p7COB2Oz29EogPImU4NY9YFj7TwV0EewoIOVLtQTk97ug6qYv c4Ig== X-Forwarded-Encrypted: i=1; AJvYcCX6xwll1pjqVUt2Re8N5eddEyn3zvE1rYSIKOVeqPOQbotksLhPqkijB70MFmfD/HEKDg7kpdJfC87FGbLs03oSKhXe87Xqxx41OZOZ X-Gm-Message-State: AOJu0YwW+9A7+9EwWBS798Afq7BxL4EYZelKFZ71RvkccWcOG0oO6Rpp Y62wg/b0j2g7Swp3YQCFVaP8Ur/UBBz++ctEZtAv2n+5vuR69z1E8vMpH63OU2s= X-Received: by 2002:a05:651c:b0b:b0:2d2:d449:6425 with SMTP id b11-20020a05651c0b0b00b002d2d4496425mr633734ljr.35.1709115900049; Wed, 28 Feb 2024 02:25:00 -0800 (PST) Received: from localhost ([193.47.165.251]) by smtp.gmail.com with ESMTPSA id jj2-20020a05600c6a0200b004120537210esm1621345wmb.46.2024.02.28.02.24.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 02:24:59 -0800 (PST) Date: Wed, 28 Feb 2024 11:24:56 +0100 From: Jiri Pirko To: Christophe JAILLET Cc: andy@greyhouse.net, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH net 2/2] net: tehuti: Fix leaks in the error handling path of bdx_probe() Message-ID: References: <9090b599c7574892b77a9521e3ddb3a52a154205.1709066709.git.christophe.jaillet@wanadoo.fr> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9090b599c7574892b77a9521e3ddb3a52a154205.1709066709.git.christophe.jaillet@wanadoo.fr> Tue, Feb 27, 2024 at 09:50:56PM CET, christophe.jaillet@wanadoo.fr wrote: >If an error occurs when allocating the net_device, all the one already >allocated and registered should be released, as already done in the remove >function. > >Add a new label, remove the now useless 'err_out_disable_msi' label and >adjust the error handling path accordingly. > >Fixes: 1a348ccc1047 ("[NET]: Add Tehuti network driver.") >Signed-off-by: Christophe JAILLET >--- >Compile tested only. Looks okay. Reviewed-by: Jiri Pirko