Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp512123rdb; Tue, 23 Jan 2024 06:34:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IHdby73/2rHMvXCCJA1FettOQY99tHVO/mWLI3N4d+MJyTVWTPUZWHHds2UDHYgQpEZk98i X-Received: by 2002:a17:906:ff4b:b0:a2e:c311:c6fe with SMTP id zo11-20020a170906ff4b00b00a2ec311c6femr391179ejb.10.1706020449239; Tue, 23 Jan 2024 06:34:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706020449; cv=pass; d=google.com; s=arc-20160816; b=QP/B+4GJ7IFsPkqLgoOCCe85PbeaeVyUvixALeww+xLHE0XxAdfzv9W0+IFMN6UY7I GpC4Rwayy8FSoh6AJetK03qvjltyfaf0iz9KJggLZ0Xz+LxiL6aP2VrFt+v0hmGavzn5 KBmhNWI/19dN2f6KAKjURd/cWSIfLQx4D4ICl1ugd86VYr1satX/5NCED9qwRbfuz5lS rltxZJ056iDb2CNFjot/gvaBarO6bH8yb3yRDjs/x3gFAi5fEnqDGNM1tob1XUp2YSxN 9NJamZURazsYJmHboEdLVA2DiDLZ8F7lyasNSsl1k0NVt3vu923yYgqJICqRqYq8+Zyl cAGw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=afX4MBYgBgSgaER1rXAmR8RZyIDi9FE6O/tdNolPQeg=; fh=ikYh6wX4qls0YvHJfMyQSTCNzfZsjp+CzmQud2oc2P4=; b=os7K2MZ3jRjMYMUwcqFOUYwu/BhR6mJsd8hnM9+E0h4C5OqBDHu8LyLcgAfIadCsVx bByTwHUV02FZTiaSfnhLwIX6SJI9ydS8fnx/WkDW6W2SnQPez2wsglX/QDccYZU54SKL 9n+O5EJQ28ySlm5OW7ZTQ42fCfjalZf2eRj2zoE7531TZ2Y+Ib8gPP+uO30FIlbGe9te jcNVG4La0iWw+GHt758zEK5fNe4qUFSrdttwywGsxEWxaSUB5MhcoaWjnhIbh9lVnoO2 lWhsK5j8Wx6JeeIt5hUt6dkZcGYagxOFWek7P9DaOHZSsd8Emfron5cSaCSKpsrDNlzl uuQA== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-35452-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35452-linux.lists.archive=gmail.com@vger.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 s14-20020a170906284e00b00a27765fb8f2si11943433ejc.825.2024.01.23.06.34.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 06:34:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35452-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; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-35452-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35452-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 am.mirrors.kernel.org (Postfix) with ESMTPS id F34AD1F2660A for ; Tue, 23 Jan 2024 14:34:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 11F7650A6D; Tue, 23 Jan 2024 14:33:51 +0000 (UTC) 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 903EF5026F for ; Tue, 23 Jan 2024 14:33:50 +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=1706020430; cv=none; b=gqZy6k0qg7mnXdOPzGEN+F+d792TSA2GX4llIUqsUugZUquZXweDC+XL/0GLET4aem/QKWDRkowUTV+5EKO0Rx61Zr6OquFzPUEIwOu3bqU64vX8Ppyx03fSYT0CQKb7YU0CvPq8FQMINO3t5nHrlNOctF1stxYEBACkIAi32xk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706020430; c=relaxed/simple; bh=OrQaBm/3X4/JptmXUDv2nfceAYZz3BfKaK5EznOjCgE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dAmrn1NkVCOOIL7xMmB9qpFjaJz4JyHx6W6osytNhVj+Pcw7aIhbDVIOauH9ctbkNM5q7akasw57DoX98+qHGF0c2BlH4X73pCLI/8lLDlxbp50Eq7FTKbIzMe2vaZs4qp2b503ZBjz8y1QmORcPDrYsAk3s5dFwz/2n5+ZfSJo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 45568C433B1; Tue, 23 Jan 2024 14:33:49 +0000 (UTC) Date: Tue, 23 Jan 2024 09:35:19 -0500 From: Steven Rostedt To: Christian =?UTF-8?B?S8O2bmln?= Cc: Dave Airlie , "Bhardwaj, Rajneesh" , Linus Torvalds , LKML , Felix Kuehling , dri-devel@lists.freedesktop.org, Fedor Pchelkin Subject: Re: [BUG] BUG: kernel NULL pointer dereference at ttm_device_init+0xb4 Message-ID: <20240123093519.3ed37601@gandalf.local.home> In-Reply-To: References: <20240122180605.28daf23a@gandalf.local.home> <20240122181547.16b029d6@gandalf.local.home> <20240122181901.05a3b9ab@gandalf.local.home> <27c3d1e9-5933-47a9-9c33-ff8ec13f40d3@amd.com> <20240122203552.529eeb20@gandalf.local.home> <20240122215200.1ec02a4a@gandalf.local.home> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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: quoted-printable On Tue, 23 Jan 2024 10:43:04 +0100 Christian K=C3=B6nig wrote: > While applying the fix a week ago I was under the impression that QXL=20 > doesn't use a device structure because it doesn't have one and so can't=20 > give anything meaningful for this parameter. >=20 > If QXL does have a device structure and can provide it I would rather=20 > like to go down this route and make the device and with it the numa node= =20 > mandatory for drivers to specify. Then at a minimum my original fix should be applied. Perhaps with a warning too. That is, I added at the beginning of that function: if (!dev) return -EINVAL; Could have that be: if (WARN_ON_ONCE(!dev)) return -EINVAL; In any case, it should not cause the system to crash. -- Steve