• James Smart's avatar
    nvme_fcloop: fix abort race condition · 278e0960
    James Smart authored
    A test case revealed a race condition of an i/o completing on a thread
    parallel to the delete_association generating the aborts for the
    outstanding ios on the controller.  The i/o completion was freeing the
    target fcloop context, thus the abort task referenced the just-freed
    memory.
    
    Correct by clearing the target/initiator cross pointers in the io
    completion and abort tasks before calling the callbacks. On aborts
    that detect already finished io's, ensure the complete context is
    called.
    Signed-off-by: default avatarJames Smart <james.smart@broadcom.com>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    278e0960
fcloop.c 28.1 KB