Re: [BUG] BUG: kernel NULL pointer dereference at ttm_device_init+0xb4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 23 Jan 2024 10:43:04 +0100
Christian König <christian.koenig@xxxxxxx> 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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux