lkml.org 
[lkml]   [2018]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.9 42/95] IB/srp: Fix srp_abort()
    Date
    4.9-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Bart Van Assche <bart.vanassche@wdc.com>

    commit e68088e78d82920632eba112b968e49d588d02a2 upstream.

    Before commit e494f6a72839 ("[SCSI] improved eh timeout handler") it
    did not really matter whether or not abort handlers like srp_abort()
    called .scsi_done() when returning another value than SUCCESS. Since
    that commit however this matters. Hence only call .scsi_done() when
    returning SUCCESS.

    Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/infiniband/ulp/srp/ib_srp.c | 8 +++++---
    1 file changed, 5 insertions(+), 3 deletions(-)

    --- a/drivers/infiniband/ulp/srp/ib_srp.c
    +++ b/drivers/infiniband/ulp/srp/ib_srp.c
    @@ -2626,9 +2626,11 @@ static int srp_abort(struct scsi_cmnd *s
    ret = FAST_IO_FAIL;
    else
    ret = FAILED;
    - srp_free_req(ch, req, scmnd, 0);
    - scmnd->result = DID_ABORT << 16;
    - scmnd->scsi_done(scmnd);
    + if (ret == SUCCESS) {
    + srp_free_req(ch, req, scmnd, 0);
    + scmnd->result = DID_ABORT << 16;
    + scmnd->scsi_done(scmnd);
    + }

    return ret;
    }

    \
     
     \ /
      Last update: 2018-04-22 17:02    [W:4.407 / U:0.088 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site