[BUG] BUG: kernel NULL pointer dereference at ttm_device_init+0xb4
Steven Rostedt
rostedt at goodmis.org
Tue Jan 23 14:35:19 UTC 2024
On Tue, 23 Jan 2024 10:43:04 +0100
Christian König <christian.koenig at 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
More information about the dri-devel
mailing list