• Tejun Heo's avatar
    hd: fix locking · 01919442
    Tejun Heo authored
    hd dance around local irq and HD_IRQ enable without achieving much.
    It ends up transferring data from irq handler with both local irq and
    HD_IRQ disabled.  The only place it actually does something is while
    transferring the first block of a request which it does with HD_IRQ
    disabled but local irq enabled.
    
    Unfortunately, the dancing is horribly broken from locking POV.  IRQ
    and timeout handlers access block queue without grabbing the queue
    lock and running the driver in SMP configuration crashes the whole
    machine pretty quickly.
    
    Remove meaningless irq enable/disable dancing and add proper locking
    in issue, irq and timeout paths.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    01919442
hd.c 18.9 KB