From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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 73CBB2E717B for ; Fri, 10 Apr 2026 01:07:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775783244; cv=none; b=QyjHaxdqVOaK1v1C37FfdVgp2Z0ZT7KDHGtOpaV06hjrydXjfGtj6YjldAKCcNuzw84jrbuQyq3fIVUUCmYLl+G0eHYUeXgZjDcicHaYYKhus3caWRGztptulOw/4lYDxEVUkdhKLYiyNnSJUceRNxmStNZYAQbAK0znBBRxs+k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775783244; c=relaxed/simple; bh=+XU0Cnc0F0LjxGhCq7YCeZ8ecdZAWbM862WFRJOW89Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=qkb0RY9+EiixGH21DbPr1OqXIrbhVRPukXMfnYKUE2rXmro340dngE3hWDHJxysnb8iMSut1j1Sbo7l7wua2FBR0nJpbQJuNciK3JrPrWyS14pPPPN4qeq1npitl4JIr8qIJnEvOAmLELeKD+3WpVCaBEhGEFivt0JbalpL/O/Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=r4/f9r80; arc=none smtp.client-ip=209.85.221.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="r4/f9r80" Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-43b95e5b3afso900496f8f.3 for ; Thu, 09 Apr 2026 18:07:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775783242; x=1776388042; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xlkLKvPawGtjDmpjAZR4K55fjs9B8OmYHw7Fk7oXyLI=; b=r4/f9r80WYeUHAtZe0OL6q+T6cTZ49v3Mt5y8M8SI0LXZ9TOXWRSjgDJn9fC7Om3hu xaFJm4CxnLcNiTsXYlKghCnaZzVmt69L1Vt0NbFZE5bUKPA101RjCrgzOVylfbvOHl2a 3oPHc4D+gYju/nri20m6cuvxSWawJj0Gs25mWzMW1jWo+qFU0pa0rEC2aBHR93gQAh08 JV+5BYHn54yKA7N8oCqjP1WvrKOyo+Bd4nloSTkzCd6KCdpEUz4qSzS7qyE6EtIt6mcW 8S6jtK7NOyKDc/mrwsKDKA97apbhTF30pRlM2nxh1Wx8IgVlkQPFV3W2RPuuiE78SQBF 1prQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775783242; x=1776388042; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=xlkLKvPawGtjDmpjAZR4K55fjs9B8OmYHw7Fk7oXyLI=; b=jI394DcTxDyzAioocIdCJ9pHNVpknA65nUwSOLShhtfPkGSMPHpg+RPpYLnOYE1uMU X/mijP9V0gxtvItL5AWMpH5HxCYjl5fLdWLvasG9uqQOP5rG8EdQmxR7vApeZ41l6tki kzPxtuGIt0WXz9M5j21o60SgZXiawdUwB90PVboUy5xtYBeMhObrMm0b2HtxtjLp7wMI hX6HZ1CchfX3zKSkBSGt0BGA22p5tzqpHrRDaUD/JLkG96UcGyieoUaU3NXauiJb++EO 8SvdM/bpxSJQhNHxNnG7uPv3D7x5kKyvYwZCOu5emKhMwd8kpz+z8r6NAOu8YmKQQbgH hYWA== X-Forwarded-Encrypted: i=1; AJvYcCWd+Sfztl3jtckG2wILsIazr8kdBxl7Ye4ZqdaSvZaanxOmJD2d4xQISe1pDqSsjpJEWD1DVY/3WsZo0LU=@vger.kernel.org X-Gm-Message-State: AOJu0Yw/jegYNxqZtp1eVwp8zvlk23XtPIOZOODA/47VkeWRlZWl9hLL eGLIntHTW5dSgnwKQY//nEc31v6nbBm67M9yinsY8T5YJaPOFuPoCNfk2t8zCyiW X-Gm-Gg: AeBDievY9AJVXXSRf/QP04rQfgdwceQDrPcnT9D2IRE/KMbPloS13pLalJALEK59xgh +U12pAh9mWG8uaILZvjt5s2CMS0YTr1M/59UjwYOXSYy6MVx3KgVE+QcYyUt9NHx62FonY8RfMw JPtpb3OFA3hBs5p8VsFQlzPVkA8cT84iCdIsKsc8ENc7FF/hDW5QHrHALKJMVxopjIjjYtO5FhB WBWISaF1amtXjyZbdjIGxk9fmyBeZSkWkvosPD8/KGToVWQZyMRRUrdGF4lDT+JLWYugAEeNSjd VzS8LgXZ5XilYQ9lNne1UW+5669izH6QGy0FQm7JlpfE9Ztxkx7ivF6z9AjGEaNh1oQ3aOepHjS 1g2I+0HF6pO94HieeZUP7eniMlro8NjPq/mHzIqPKeHaumWg9549HMM7LpNYhkBO0+WmgycOHVr jNGR1DUvJ/N74GUemwLgfm6I/Au7Wycm1DLHrsOT4Cf/Z2vp9hi72NkAY3fQ4n2gnXc6n0F0xHh FcNABUFcO9ooxGfdW/bPliKJdPI0hArUGU67hXZPyakTTUWFpQWu8uu4+8= X-Received: by 2002:a5d:64c6:0:b0:43b:4aba:8f35 with SMTP id ffacd0b85a97d-43d6427a2d0mr1520761f8f.12.1775783241750; Thu, 09 Apr 2026 18:07:21 -0700 (PDT) Received: from DESKTOP-NQ2T5I7.localdomain (heme-13-b2-v4wan-167795-cust403.vm32.cable.virginm.net. [81.108.45.148]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43d63de2a48sm3485108f8f.7.2026.04.09.18.07.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2026 18:07:21 -0700 (PDT) From: Prathamesh Deshpande To: Leon Romanovsky Cc: jgg@ziepe.ca, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] IB/mlx5: Fix potential NULL dereference in query_device Date: Fri, 10 Apr 2026 02:07:06 +0100 Message-ID: <20260410010719.5300-1-prathameshdeshpande7@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260409095158.GE86584@unreal> References: <20260409095158.GE86584@unreal> 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=UTF-8 Content-Transfer-Encoding: 8bit On Thu, Apr 9, 2026 at 12:51:58 +0300, Leon Romanovsky wrote: > uhw is not guaranteed to be non-NULL in mlx5_ib_query_device(). This > function is used in both kernel and user-space paths. The only condition > that cannot occur is a caller providing a non-zero 'uhw_outlen' while > passing a NULL 'uhw' pointer. Hi Leon, Thanks for the explanation. Since uhw_outlen effectively guards uhw in these paths, I’ll drop this patch as a static analysis false positive. Thanks, Prathamesh