From mboxrd@z Thu Jan 1 00:00:00 1970 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 1BFC721FF54; Tue, 1 Jul 2025 11:30:20 +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=1751369421; cv=none; b=nJZKGsaFRALnFj/lTmRLVv3jOuSmLEj4TS2RPFG1KZo/rK1RgSWU6mRUNZBakFDtqkqiRFa5Uo/iONmZrO2K6C1xjQs5hIXHesRqtl3qfDP8g0J2ZqR7q1lVZWIK+8PAbqeF1j0hG02UQrLJXE8DjEZQMHRdLgMqdrNffh6BI90= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751369421; c=relaxed/simple; bh=dswg9bWDsyU5K/rkhLpgwXZp6fvBIPVcg+nWuf/WKnw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rNCRBBXdhM2VCB8A/xUtJjFYAw405Gzeg3y3LiBBHR01AnX0jolDYj2JVf9GhUTDLn/3+dZ2AXPGAv1TcRil50XpNFj4VCokrT2UIAKlAaINmP3pV6H8XnjQnX+rYyp+RKk5ZKgmNY2YSRmdQLvkvqSyEiiWZmyTq/3I3haiuOU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=d2qjkLjL; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="d2qjkLjL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A49B9C4CEEB; Tue, 1 Jul 2025 11:30:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1751369420; bh=dswg9bWDsyU5K/rkhLpgwXZp6fvBIPVcg+nWuf/WKnw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=d2qjkLjLdHNod91CztsAQEoSm0icARL5YjRBe4V2xZCE+MO7rMmRlcDnqUmXgtSkC 2FvcMiACGnsTBCabiDeLjPcLtxpP2Of706WmYdyv1y03EfkQOKNP/0Ek9Nh2a79Mtf Uhcl6VjGMhZMk3pX2Xj47RmffDR6DyVOTtiQ2JMEt0XOnnuoUZBu/ZH12NyFmMlikT 1iqAkMuOfBj/Zsox51FHjqkGxAkUzYXZUJbddd7T6EijB5GPnXdblqCJpEirhDjxYp W9uKETFZ8cZxE0+tCr0nq8EvG28aNlGXlKy/IUe74eqC4VvamblaU4JgmlyMsV+1xr m75JqFkKFmI+A== Date: Tue, 1 Jul 2025 14:30:14 +0300 From: Leon Romanovsky To: Dawid Osuchowski Cc: Jason Gunthorpe , Stav Aviram , Andrew Lunn , Eric Dumazet , Jakub Kicinski , linux-rdma@vger.kernel.org, Mark Bloch , netdev@vger.kernel.org, Paolo Abeni , Saeed Mahameed , Tariq Toukan Subject: Re: [PATCH mlx5-next] net/mlx5: Check device memory pointer before usage Message-ID: <20250701113014.GA6278@unreal> References: Precedence: bulk X-Mailing-List: netdev@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 Mon, Jun 30, 2025 at 01:18:22PM +0200, Dawid Osuchowski wrote: > On 2025-06-30 12:35 PM, Leon Romanovsky wrote: > > From: Stav Aviram > > > > Add a NULL check before accessing device memory to prevent a crash if > > dev->dm allocation in mlx5_init_once() fails. > > > > Fixes: c9b9dcb430b3 ("net/mlx5: Move device memory management to mlx5_core") > > Signed-off-by: Stav Aviram > > Signed-off-by: Leon Romanovsky > > Given this is a fix, the net tree should be targeted instead of next. This fix is mainly for RDMA and changes in net-next are by-product. The current target is mlx5-next. Thanks > > Best regards, > Dawid