Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1100091lqo; Sat, 11 May 2024 07:23:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWs4IMd2XKqDJyQcgMZLtEzLsv90j/IMjG+wPMG8X/wCSc7DhK9j6lY7md7C+rk+u0CDHSfAkZamEiNrNULjCevGXOzkzAOVmXCUVP9Ew== X-Google-Smtp-Source: AGHT+IGULih2ZviVlnbHi6CT4oQY8nJWJG7NArd0bX9MzFB3m4szu8W+euAiZ+SE0dGwNRQKNtxy X-Received: by 2002:ac2:58c5:0:b0:520:7a44:3f30 with SMTP id 2adb3069b0e04-5220fb6ab92mr3567968e87.16.1715437407193; Sat, 11 May 2024 07:23:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715437407; cv=pass; d=google.com; s=arc-20160816; b=iBpSUanQhwpYKOgYVxKuRYVo/LR4JzQdOvNcj78RL01S0MkRzbsN/zBWD/0k+3jj4o 3k5Nb6fG/CU2UVNRM/XKh3MVjsgNuk7DxmB5G89kkZiFjrEm87CVDIb97zukIejdneZi GWRONANuiS99qundD+YyFpJUo4VfxKN3ZnXlV7jr/UTZV7p60F7zetvAqweeLqnndXJW tfwg5XgtGUgcdvnyaRThP65VncPoKxw8FWqlbHHbggZo/8A2Cxc0aG3iDzg9Oye79Tct jEn244AKPmRdSJ+yVJD/nsCHirPSTjC5DXXFMovMsuG5x4DUIJpBaMTndZtMQXST1AUH NbRg== 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=/M8XzaKyOKR9M6upSQmUKUTDgpK2qVLuz0at2/O/FR4=; fh=M+POvgCMfop7SxyC13gKudn6PvVLYPjum9OkcfsT4EM=; b=ru1Yd61c9XEofwssfcK4kmT4+pWmPohyrJg0cizr7vI8mGm57Re/B4ICnbmS+cE7vJ 2xqvno0JWW/oLq+pNsC5HMrrCe5a0AVxmvzYDT+rayxqKDTBFvynu/Id0rKNzZpQTlmb pb4TH1oagcdhZYa4sHDd91vpg5pCaxVT8Ii6aTH/z8X7Gcdl0PY/jpdg9AYN+YgUXSNW F+nh5W37h3ucXqviVozVF32mgEzaEyZJYuIdEGEh+jfzhY6aWP6kXd/z2cWShlzDGZ3W 6EeF+DeO/VYQq34yF/woE4VrnbjbTVECwSuqmATYDsTKb0O3h76iNF1VsoTIEQNhRy0B oVVg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kZ4ulFkd; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-176574-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176574-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c327621si3119989a12.384.2024.05.11.07.23.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 May 2024 07:23:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176574-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kZ4ulFkd; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-176574-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176574-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 am.mirrors.kernel.org (Postfix) with ESMTPS id DD4941F2197C for ; Sat, 11 May 2024 14:23:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A0A4F54BE7; Sat, 11 May 2024 14:23:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kZ4ulFkd" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B80F8537F8; Sat, 11 May 2024 14:23:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715437391; cv=none; b=XK3123Co9bAL6DE4VorGJhmQMt7+EWCNb940BfHpLuTGagATSjb4Hdg2TMfR3OBut+/RbdkwJSANRDektFHYUvY3V7kU0XMtqEZFLqwIGx2ZfDjGhO5Cc10TWy/slrC929mTBbADRP1ZfCHsLXCXKUQ7+u0evo8u8oACC6jpAeA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715437391; c=relaxed/simple; bh=Qr8OpivSWnfs8bmKLMFIrsKgWu6HXAneyPPW5cVew7E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kX4Q+59i6ciW9ESxzypQqbQjRWgJ2mcKBcBEluf/4j79PHUoNpCxn0Za+DGXLnoAmdu49+EJvQfqIxdTYLeyljSmf1idQCbVBdtZCekRRjhAduWFKcmxvqL9qLkJrfamIxemUqU+tea5yxd/hOOVmryQHxldSPJ+sVnXY4AY+NI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kZ4ulFkd; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D6E9BC2BBFC; Sat, 11 May 2024 14:23:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715437391; bh=Qr8OpivSWnfs8bmKLMFIrsKgWu6HXAneyPPW5cVew7E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kZ4ulFkdNsrM7k7LM1jL5rioqRbHu1PZmHoCDp2vK8uLoX4HjbiGskqQuy25zJW/Q P4OiwrJL7eBs/ydGg6dzsacLJeu9NXOVLzMpueRnCC/ZXOcHk3PeLZ6YicfHr9PACQ Y99ZdSUFZ6lRaedOktxIifDlCPzTbL5A31nnsJ+DYepknjqmBXRUjYC9phHKucV6V5 8rW/kDUR2AYxN758gD+8iaokNdeTVXamk1iKLF6yI35hoiBVVk13fdeDtu4tmducYp YQuTS6Vx4o546E5lTdtjY6V8NxNDA92+bOH1BeojsY19YedJvh/wcRfDV5eAhnXw65 57XnoW++ZtrZg== Date: Sat, 11 May 2024 15:23:04 +0100 From: Simon Horman To: Dan Carpenter Cc: Shay Drory , Saeed Mahameed , Leon Romanovsky , Tariq Toukan , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Moshe Shemesh , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH net] net/mlx5: Fix error handling in mlx5_init_one_light() Message-ID: <20240511142304.GH2347895@kernel.org> References: 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: On Thu, May 09, 2024 at 02:00:18PM +0300, Dan Carpenter wrote: > If mlx5_query_hca_caps_light() fails then calling devl_unregister() or > devl_unlock() is a bug. It's not registered and it's not locked. That > will trigger a stack trace in this case because devl_unregister() checks > both those things at the start of the function. > > If mlx5_devlink_params_register() fails then this code will call > devl_unregister() and devl_unlock() twice which will again lead to a > stack trace or possibly something worse as well. > > Fixes: bf729988303a ("net/mlx5: Restore mistakenly dropped parts in register devlink flow") > Fixes: c6e77aa9dd82 ("net/mlx5: Register devlink first under devlink lock") > Signed-off-by: Dan Carpenter Hi Dan, I believe that after you posted this patch, a different fix for this was added to net as: 3c453e8cc672 ("net/mlx5: Fix peer devlink set for SF representor devlink port") -- pw-bot: rejected