Re: [PATCH 0/2] HID: hidraw, fix two NULL pointer dereferences

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jiri Slaby
Date: Wednesday, October 6, 2010 - 3:09 am

On 10/06/2010 12:01 PM, Antonio Ospite wrote:

Sure. Look at the code:
if (!hidraw_table[minor])
        return -ENODEV;
...
dev = hidraw_table[minor];
if (!--dev->open) {
...

This is done without minors_lock, so you can easily have dev being NULL
even though the first if.

regards,
-- 
js
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 0/2] HID: hidraw, fix two NULL pointer dereferences, Jiri Slaby, (Wed Oct 6, 3:09 am)