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)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 17 Oct 2012 02:49:25 +0000 (03:49 +0100)
commit 904753da183566c71211d23c169a80184648c121 upstream.

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>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/target/iscsi/iscsi_target.c

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