[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <7e61bfab-513e-da45-acd6-f3f3998d46e6@ispras.ru>
Date: Thu, 8 Sep 2016 12:18:40 +0300
From: Pavel Andrianov <andrianov@...ras.ru>
To: Felipe Balbi <felipe.balbi@...ux.intel.com>
Cc: Michal Nazarewicz <mina86@...a86.com>,
linux-kernel@...r.kernel.org, ldv-project@...uxtesting.org,
Vaishali Thakkar <vaishali.thakkar@...cle.com>
Subject: A potential bug in drivers/usb/gadget/udc/m66592-udc.ko
Hi!
There is a potential bug in drivers/usb/gadget/udc/m66592-udc.ko.
In m66592_probe interrupts are requested at line 1612. After that
initialization of common resources is continued. For example, in
-> usb_add_gadget_udc (line 1678)
-> usb_add_gadget_udc_release
-> udc_bind_to_driver
-> usb_gadget_udc_start
-> m66592_udc_start
m66592->driver is set. In interrupt handler the data is used, thus if
interrupt comes before udc_start is executed, null pointer dereference
occurs.
Should the call of request_irq be after complete initialization?
--
Pavel Andrianov
Linux Verification Center, ISPRAS
web: http://linuxtesting.org
e-mail: andrianov@...ras.ru
Powered by blists - more mailing lists