All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "Christian König" <christian.koenig@amd.com>
Cc: Dave Airlie <airlied@gmail.com>,
	"Bhardwaj, Rajneesh" <rajneesh.bhardwaj@amd.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Felix Kuehling <Felix.Kuehling@amd.com>,
	dri-devel@lists.freedesktop.org,
	Fedor Pchelkin <pchelkin@ispras.ru>
Subject: Re: [BUG] BUG: kernel NULL pointer dereference at ttm_device_init+0xb4
Date: Tue, 23 Jan 2024 09:35:19 -0500	[thread overview]
Message-ID: <20240123093519.3ed37601@gandalf.local.home> (raw)
In-Reply-To: <c45df2c7-695b-42be-b893-a4f520d9e723@amd.com>

On Tue, 23 Jan 2024 10:43:04 +0100
Christian König <christian.koenig@amd.com> wrote:

> While applying the fix a week ago I was under the impression that QXL 
> doesn't use a device structure because it doesn't have one and so can't 
> give anything meaningful for this parameter.
> 
> If QXL does have a device structure and can provide it I would rather 
> like to go down this route and make the device and with it the numa node 
> 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

WARNING: multiple messages have this Message-ID (diff)
From: Steven Rostedt <rostedt@goodmis.org>
To: "Christian König" <christian.koenig@amd.com>
Cc: Dave Airlie <airlied@gmail.com>,
	Felix Kuehling <Felix.Kuehling@amd.com>,
	"Bhardwaj, Rajneesh" <rajneesh.bhardwaj@amd.com>,
	dri-devel@lists.freedesktop.org,
	LKML <linux-kernel@vger.kernel.org>,
	Fedor Pchelkin <pchelkin@ispras.ru>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [BUG] BUG: kernel NULL pointer dereference at ttm_device_init+0xb4
Date: Tue, 23 Jan 2024 09:35:19 -0500	[thread overview]
Message-ID: <20240123093519.3ed37601@gandalf.local.home> (raw)
In-Reply-To: <c45df2c7-695b-42be-b893-a4f520d9e723@amd.com>

On Tue, 23 Jan 2024 10:43:04 +0100
Christian König <christian.koenig@amd.com> wrote:

> While applying the fix a week ago I was under the impression that QXL 
> doesn't use a device structure because it doesn't have one and so can't 
> give anything meaningful for this parameter.
> 
> If QXL does have a device structure and can provide it I would rather 
> like to go down this route and make the device and with it the numa node 
> 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

  reply	other threads:[~2024-01-23 14:33 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-22 23:06 [BUG] BUG: kernel NULL pointer dereference at ttm_device_init+0xb4 Steven Rostedt
2024-01-22 23:06 ` Steven Rostedt
2024-01-22 23:15 ` Steven Rostedt
2024-01-22 23:15   ` Steven Rostedt
2024-01-22 23:19   ` Steven Rostedt
2024-01-22 23:19     ` Steven Rostedt
2024-01-23  0:43     ` Linus Torvalds
2024-01-23  0:43       ` Linus Torvalds
2024-01-23  0:56       ` Bhardwaj, Rajneesh
2024-01-23  1:25         ` Linus Torvalds
2024-01-23  1:25           ` Linus Torvalds
2024-01-23  1:35         ` Steven Rostedt
2024-01-23  1:35           ` Steven Rostedt
2024-01-23  2:21           ` Dave Airlie
2024-01-23  2:21             ` Dave Airlie
2024-01-23  2:32             ` Dave Airlie
2024-01-23  2:32               ` Dave Airlie
2024-01-23  2:52               ` Steven Rostedt
2024-01-23  2:52                 ` Steven Rostedt
2024-01-23  9:43                 ` Christian König
2024-01-23  9:43                   ` Christian König
2024-01-23 14:35                   ` Steven Rostedt [this message]
2024-01-23 14:35                     ` Steven Rostedt
2024-01-23  1:06     ` Bhardwaj, Rajneesh
2024-01-23  1:06       ` Bhardwaj, Rajneesh
2024-01-23  0:29 ` Bhardwaj, Rajneesh
2024-01-23  0:34   ` Steven Rostedt
2024-01-23  0:34     ` Steven Rostedt
2024-01-23  0:40     ` Bhardwaj, Rajneesh
2024-01-23  0:40       ` Bhardwaj, Rajneesh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240123093519.3ed37601@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=Felix.Kuehling@amd.com \
    --cc=airlied@gmail.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pchelkin@ispras.ru \
    --cc=rajneesh.bhardwaj@amd.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.