From: Bhanu Prakash Gollapudi Date: Wed, 27 Jul 2011 18:32:10 +0000 (-0700) Subject: [SCSI] bnx2fc: hold tgt lock when calling cmd_release X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bd4d5de8b9b97ff100342948c39634b44c43fe81;p=linux-beck.git [SCSI] bnx2fc: hold tgt lock when calling cmd_release Signed-off-by: Bhanu Prakash Gollapudi Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c index 797b0051b6ff..7154c44fa2c9 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_io.c +++ b/drivers/scsi/bnx2fc/bnx2fc_io.c @@ -752,7 +752,9 @@ retry_tmf: rc = bnx2fc_init_mp_req(io_req); if (rc == FAILED) { printk(KERN_ERR PFX "Task mgmt MP request init failed\n"); + spin_lock_bh(&tgt->tgt_lock); kref_put(&io_req->refcount, bnx2fc_cmd_release); + spin_unlock_bh(&tgt->tgt_lock); goto tmf_err; }