iscsit: remove incorrect unlock in iscsit_build_sendtargets_resp
authorChristoph Hellwig <hch@infradead.org>
Wed, 26 Sep 2012 12:00:37 +0000 (08:00 -0400)
committerNicholas Bellinger <nab@linux-iscsi.org>
Tue, 2 Oct 2012 21:42:25 +0000 (14:42 -0700)
Fix a potential multiple spin-unlock -> deadlock scenario during the
overflow check within iscsit_build_sendtargets_resp() as found by
sparse static checking.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target.c

index cca6d1384a1fdb7cc11ac56fb272c37311df0389..29f3b2414596fedef97448838888e96ab00d4b39 100644 (file)
@@ -3274,7 +3274,6 @@ static int iscsit_build_sendtargets_response(struct iscsi_cmd *cmd)
                len += 1;
 
                if ((len + payload_len) > buffer_len) {
-                       spin_unlock(&tiqn->tiqn_tpg_lock);
                        end_of_buf = 1;
                        goto eob;
                }