Re: Oops/Warning report for the week of March 28th 2008

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Arjan van de Ven <arjan@...>
Cc: Linux Kernel Mailing List <linux-kernel@...>, NetDev <netdev@...>, Dmitry Torokhov <dtor@...>
Date: Friday, March 28, 2008 - 4:51 pm

On Fri, 28 Mar 2008, Linus Torvalds wrote:

Hmm. Definitely not from the kernel mailing list. I'm intrigued, where did 
that oops #5814 come from (picked a recent one at random)?

The thing is recent, and oopses on "mutex_lock(dev->mutex)" in 
input_release_device. In particular, the path *seems* to be this one:

  evdev_release ->
    evdev_ungrab ->
      input_release_device ->
        mutex_lock ->
          mutex_lock_nested ->
            __mutex_lock_common ->
              list_add_tail(&waiter.list, &lock->wait_list)

where "lock->wait_list.prev" seems to be 0x6b6b6b6b6b6b6b6b, which is the 
use-after-free poison pattern.

(In fact, I think the access that actually oopses is when the 
debug version of __list_add() does

	if (unlikely(prev->next != next)) {

because that "prev" pointer is crap).

So it seems that when input_release_device() does:

	struct input_dev *dev = handle->dev;

	mutex_lock(&dev->mutex);

the "dev" it uses has already been released. And this only shows up as a 
problem when you have slab debugging turned on (like the Fedora kernels 
do, thank you all Fedora guys).

The odd thing is that I don't think any of this code has really changed 
recently. 

			Linus
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Oops/Warning report for the week of March 28th 2008, Arjan van de Ven, (Fri Mar 28, 2:55 pm)
Re: Oops/Warning report for the week of March 28th 2008, Linus Torvalds, (Fri Mar 28, 4:21 pm)
Re: Oops/Warning report for the week of March 28th 2008, Arjan van de Ven, (Fri Mar 28, 6:33 pm)
Re: Oops/Warning report for the week of March 28th 2008, Arjan van de Ven, (Fri Mar 28, 6:58 pm)
Re: Oops/Warning report for the week of March 28th 2008, Linus Torvalds, (Fri Mar 28, 4:51 pm)
Re: Oops/Warning report for the week of March 28th 2008, Dmitry Torokhov, (Fri Mar 28, 5:16 pm)
Re: Oops/Warning report for the week of March 28th 2008, Johannes Berg, (Fri Mar 28, 5:01 pm)
Re: Oops/Warning report for the week of March 28th 2008, Linus Torvalds, (Fri Mar 28, 5:24 pm)
Re: Oops/Warning report for the week of March 28th 2008, Johannes Berg, (Fri Mar 28, 5:43 pm)
Re: Oops/Warning report for the week of March 28th 2008, Linus Torvalds, (Fri Mar 28, 6:01 pm)
Re: Oops/Warning report for the week of March 28th 2008, Johannes Berg, (Fri Mar 28, 6:14 pm)