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 0FE941DA23 for ; Sat, 18 Apr 2026 17:35: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=1776533721; cv=none; b=l4W9drbFtMf4IuUDbB7K331kXPK6dbiROs9TfONwD94w9zPkrUiDFb8QsneTZHtykYmqy/accPT+dWiJgEBqY6/IItT8WhjGcq1pltlM0nGZriym3KZVWnxap+4OBvGrQpUZHVxfrk/cPRsTLk9LgPUrvETLTuxSOT1lT3W5C60= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776533721; c=relaxed/simple; bh=6zlWUhd+ODi0eJZfqAbsxg62XBlwsUK0bjyq54H5TEc=; h=Mime-Version:Content-Type:Date:Message-Id:To:From:Subject:Cc: References:In-Reply-To; b=GQWR6DVP4nbtacZRR4RaKwz0n5T8YfDnCTqcajz89rWgtMyw/mYzwfdw/w1GnziHxfwQLSGEpNma9aD6N8o0nRdsLQWL4BkeBvcGeCGJaNsgKZBKZ6f7exRXVqYnZATKfUmVO8ssOvFoJ0xLtozwpHcslu9dKmzJ8OePOlqfv2Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GPkTURJL; 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="GPkTURJL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D707BC19424; Sat, 18 Apr 2026 17:35:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776533720; bh=6zlWUhd+ODi0eJZfqAbsxg62XBlwsUK0bjyq54H5TEc=; h=Date:To:From:Subject:Cc:References:In-Reply-To:From; b=GPkTURJLGcthqXyT8SfCkzCkb0wGxSy6cXAnSiRlC4XR05KqRU23oH1AxSr3ldcVR HOf70d7SynZE8JREm/vEwcl22eqqQK/V4uPfNl1DkYmxgCcG/Cd/Nqq+aovIhioaXD uafFjrbWaTYVUj2/cq7vLhpbOfAln9dL5tqW6zqo9McgqZfktzHvZjXqMd/lHuE/vN 4tchy7YwBMp1SB2MQ2pNrQJYDl3n27Tto6FTImGBLRZavoD+C4my5RAJvEX/duRW4S /OCTmHstyN5IAveDaL2Q0p+lm/8Tgek00TPCWt+IP/JCBdQYK/xVBTwfazHRnCS1Ii 9UoL17f24DY0w== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Sat, 18 Apr 2026 19:35:17 +0200 Message-Id: To: "Timur Tabi" From: "Danilo Krummrich" Subject: Re: [PATCH] drm/nouveau/gsp: Fix possible NULL pointer dereference warning in r535_dmac_alloc Cc: "sunliming@linux.dev" , "dri-devel@lists.freedesktop.org" , "nouveau@lists.freedesktop.org" , "maarten.lankhorst@linux.intel.com" , "mripard@kernel.org" , "linux-kernel@vger.kernel.org" , "simona@ffwll.ch" , "sunliming@kylinos.cn" References: <20260418071412.86022-1-sunliming@linux.dev> In-Reply-To: On Sat Apr 18, 2026 at 7:24 PM CEST, Timur Tabi wrote: > On Sat, 2026-04-18 at 14:12 +0200, Danilo Krummrich wrote: >> Are we sure that this can ever return NULL in the first place? I know th= at >> nvkm_gsp_rm_alloc_get() internally checks for IS_ERR_OR_NULL(), but I co= uldn't >> find anything within the callchain that would actually return NULL. >>=20 >> That said, I think IS_ERR_OR_NULL() checks are misleading. > > I posted a patch a couple months ago that cleans up an IS_ERR check, but = it was never picked up: Thanks! Can you please make sure to send patches to all maintainers? If the= y don't land in my inbox, I can't pick them up. :( > https://lore.freedesktop.org/nouveau/20260103000756.1002890-1-ttabi@nvidi= a.com/T/#u > > I'm quite certain that there are other similar issues in Nouveau w.r.t. I= S_ERR_OR_NULL. Yeah, that sounds likely. > I think an audit of the Nouveau error paths is in order. I suspect that = Ben's big refactors > over the past year have resulted in some invalid error paths. Are you planning to look into this? Thanks, Danilo