• Chuck Lever's avatar
    xprtrdma: Yet another double DMA-unmap · e2f34e26
    Chuck Lever authored
    While chasing yet another set of DMAR fault reports, I noticed that
    the frwr recycler conflates whether or not an MR has been DMA
    unmapped with frwr->fr_state. Actually the two have only an indirect
    relationship. It's in fact impossible to guess reliably whether the
    MR has been DMA unmapped based on its fr_state field, especially as
    the surrounding code and its assumptions have changed over time.
    
    A better approach is to track the DMA mapping status explicitly so
    that the recycler is less brittle to unexpected situations, and
    attempts to DMA-unmap a second time are prevented.
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    Cc: stable@vger.kernel.org # v4.20
    Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
    e2f34e26
verbs.c 39.2 KB