[Nouveau] [PATCH] device/tegra: fix uninitialized IRQ number
Alexandre Courbot
gnurou at gmail.com
Tue Jan 26 16:13:36 PST 2016
On Wed, Jan 27, 2016 at 5:44 AM, Lucas Stach <dev at lynxeye.de> wrote:
> Am Montag, den 25.01.2016, 18:44 +0900 schrieb Alexandre Courbot:
>> nvkm_device_tegra_new initializes the irq member of the Tegra device
>> to -1 in order to signal that it is uninitialized. However,
>> nvkm_device_tegra_fini tests it against 0 to check whether an IRQ has
>> been allocated or not. This leads to free_irq being called on -1
>> during
>> device initialization.
>>
> The convention in other parts of the Linux kernel is that IRQ number 0
> means unallocated/invalid IRQ. So I think it is the initialization to
> -1 that should be fixed instead.
Uh, that sounds unsafe. Thanks for spotting this, will resend.
More information about the Nouveau
mailing list