• Pete Zaitcev's avatar
    [PATCH] USB: ub oops in block_uevent · 77ef6c4d
    Pete Zaitcev authored
    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: default avatarPete Zaitcev <zaitcev@redhat.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    77ef6c4d
ub.c 63.2 KB