Re: PROBLEM: Kernel 2.6.26 oops if I unplug my Logitech USB 1.1 headset

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Vegard Nossum
Date: Friday, September 5, 2008 - 1:18 am

On Fri, Sep 5, 2008 at 10:01 AM, Vegard Nossum <vegard.nossum@gmail.com> wrote:

Probably totally unrelated, but I couldn't help to find this bit of
code somewhat odd. In snd_ctl_dev_disconnect():

        down_read(&card->controls_rwsem);
        list_for_each_entry(ctl, &card->ctl_files, list) {
                wake_up(&ctl->change_sleep);
                kill_fasync(&ctl->fasync, SIGIO, POLL_ERR);
        }
        up_read(&card->controls_rwsem);

...shouldn't that be using &card->ctl_files_rwlock instead of
&card->controls_rwsem? That one is always used to protect the list ops
on &card->ctl_files in all the other places. Or maybe it is already
locked from higher ups?


Vegard

-- 
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
	-- E. W. Dijkstra, EWD1036
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: PROBLEM: Kernel 2.6.26 oops if I unplug my Logitech US ..., Vegard Nossum, (Fri Sep 5, 1:18 am)