[PATCH] USB: ub oops in block_uevent
commit572ae685ec6f034eedf34e9dc90fa8d904bcfc32
authorPete Zaitcev <zaitcev@redhat.com>
Wed, 3 May 2006 07:16:00 +0000 (3 00:16 -0700)
committerChris Wright <chrisw@sous-sol.org>
Sat, 20 May 2006 22:00:28 +0000 (20 15:00 -0700)
tree532276d1b330a6ad00e4dcb79b1e22d47c2c3294
parent3aa2b0523df53ba510599942aa87c03de183ff45
[PATCH] USB: ub oops in block_uevent

In kernel 2.6.16, if a mounted storage device is removed, an oops happens
because ub supplies an interface device (and kobject) to the block layer,
but neglects to pin it. And apparently, the block layer expects its users
to pin device structures.

The code in ub was broken this way for years. But the bug was exposed only
by 2.6.16 when it started to call block_uevent on close, which traverses
device structures (kobjects actually).

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
drivers/block/ub.c