• Bart Van Assche's avatar
    IB/srp: Keep rport as long as the IB transport layer · 9dd69a60
    Bart Van Assche authored
    Keep the rport data structure around after srp_remove_host() has
    finished until cleanup of the IB transport layer has finished
    completely. This is necessary because later patches use the rport
    pointer inside the queuecommand callback. Without this patch
    accessing the rport from inside a queuecommand callback is racy
    because srp_remove_host() must be invoked before scsi_remove_host()
    and because the queuecommand callback could get invoked after
    srp_remove_host() has finished. In other words, without this patch
    the queuecommand callback can get invoked after the rport data
    structure has been freed.
    Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
    Acked-by: default avatarDavid Dillow <dillowda@ornl.gov>
    Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
    9dd69a60
scsi_transport_srp.c 10.4 KB