Received: by 10.213.65.68 with SMTP id h4csp430688imn; Tue, 13 Mar 2018 08:50:11 -0700 (PDT) X-Google-Smtp-Source: AG47ELuxhA8GvoYNegft/0MbAySnlGc1OY2HAy/zX4Wfdhs+qdIo8C8f0rlPCuvQTMjXm4c67D++ X-Received: by 2002:a17:902:8:: with SMTP id 8-v6mr951199pla.291.1520956211505; Tue, 13 Mar 2018 08:50:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520956211; cv=none; d=google.com; s=arc-20160816; b=vruX6zhBrzgygXy/vGaQQj46ykuskqCtJ3vcNO7NOoJGj7PWcZmYpTUeN8g1FChU48 PoZaALEG+aQtAcfQAPVynDXWph1s/umMkKmEZQvDg1bbipvtJOlx5vQeqQ/E12C3g9/u H8ZBmPgLwnCWIjAzLalMgm9BTLBrfeVvlytV0/MMjdScMyK0gaaMQ4dyKBCDIU1WgYo5 3m68ORREIWIcUxqZkGoqA2W9J9fTKtSxTrD7hnAGUhk16ZwWYX4yDRBkA+ZuzldZ0Uk3 sIsCOerPaIHZ+07Bi6sc7rXWKmusfJJ6nTKCgckAVLmlxSQldGaXaspkuRkacOoNui8d VsUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=0e2mg5ePaesEnsJwfZIavHuI1CLt0BJCZWj1h/NuGrg=; b=almfknc8v/CMkD+TqkOiMxgiXRUSCtNZskcoBaW2tEbbqfhybEc05HAwcIQRPgVf2/ UkUgda8RqI7xeLzsU+30iUpJKrtKH0DHGrn62IVmgzKk/KvOroj6SFXjbeJW1ysA1lx0 jTR7nsGzmp9LnwSv74KBw6qvxPDYd/Q5KqqqhZ0BTKN1l7kL5JKbhyDQ0LIjCGRS/aPC VhfU/kfwbM7Ywf/DGkIz+oK8wK+d5lpZFxRHVEcXtVxuRB84tfXJcl9h1lX5DNlt23gd rhYvoMmJC5JKQcxm12CUrzTOsgTDH+eGsAvpB/tbY7gSVq+5vi9c3RdqPFqfdwWNA3NA Y4RA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 80si342316pfn.73.2018.03.13.08.49.56; Tue, 13 Mar 2018 08:50:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934879AbeCMPkY (ORCPT + 99 others); Tue, 13 Mar 2018 11:40:24 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:35658 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934859AbeCMPkT (ORCPT ); Tue, 13 Mar 2018 11:40:19 -0400 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 1D8CB1097; Tue, 13 Mar 2018 15:40:18 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Himanshu Madhani , "Martin K. Petersen" Subject: [PATCH 4.14 112/140] scsi: qla2xxx: Fix recursion while sending terminate exchange Date: Tue, 13 Mar 2018 16:25:15 +0100 Message-Id: <20180313152505.721980371@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180313152458.201155692@linuxfoundation.org> References: <20180313152458.201155692@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: himanshu.madhani@cavium.com commit 3efc31f76dd7fc8a71cd86683909f637e9b7cadb upstream. During error test case where switch port status is toggled from enable to disable, following stack trace is seen which indicates recursion trying to send terminate exchange. This regression was introduced by commit 82de802ad46e ("scsi: qla2xxx: Preparation for Target MQ.") BUG: stack guard page was hit at ffffb96488383ff8 (stack is ffffb96488384000..ffffb96488387fff) BUG: stack guard page was hit at ffffb964886c3ff8 (stack is ffffb964886c4000..ffffb964886c7fff) kernel stack overflow (double-fault): 0000 [#1] SMP qlt_term_ctio_exchange+0x9c/0xb0 [qla2xxx] qlt_term_ctio_exchange+0x9c/0xb0 [qla2xxx] qlt_term_ctio_exchange+0x9c/0xb0 [qla2xxx] qlt_term_ctio_exchange+0x9c/0xb0 [qla2xxx] qlt_term_ctio_exchange+0x9c/0xb0 [qla2xxx] Fixes: 82de802ad46e ("scsi: qla2xxx: Preparation for Target MQ.") Cc: #4.10 Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/qla2xxx/qla_target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -3711,7 +3711,7 @@ static int qlt_term_ctio_exchange(struct term = 1; if (term) - qlt_term_ctio_exchange(qpair, ctio, cmd, status); + qlt_send_term_exchange(qpair, cmd, &cmd->atio, 1, 0); return term; }