• Andrew Morton's avatar
    [PATCH] scsi_unregister() oops fix · bfcc593b
    Andrew Morton authored
    Some drivers such as aha1542 and aic7xxx_old will call scsi_register() and
    then, if some succeeding operations fails they will call scsi_unregister(),
    without an intervening scsi_set_host().
    
    This causes an oops in scsi_put_device(), because kobj->parent is NULL.
    
    In other words, scsi_register() immediately followed by scsi_unregister()
    is guaranteed to oops.
    
    The patch makes scsi_host_dev_release() more robust against this usage
    pattern.
    bfcc593b
hosts.c 9.28 KB