• Hugh Dickins's avatar
    [PATCH] suspend regression: sysfs deadlock · 266d4f40
    Hugh Dickins authored
    Suspend deadlocks when trying to unregister /sys/block/sr0.
    
    This comes from Oliver's commit 94bebf4d
    "Driver core: fix race in sysfs between sysfs_remove_file() and
    read()/write()".
    
    sysfs_write_file downs buffer->sem while calling flush_write_buffer, and
    flushing that particular write buffer entails downing buffer->sem in
    orphan_all_buffers, resulting in the obvious self-deadlock.
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    266d4f40
inode.c 7.24 KB