Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1633282rwd; Mon, 15 May 2023 00:18:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6MYoH+UyresGl3mCRUAWI+F4OnGIgaqNh6IiI5RX4kLhyxXPIHNUdOTJA/m0cEEx+6XgEY X-Received: by 2002:a05:6a00:1996:b0:646:b165:1b29 with SMTP id d22-20020a056a00199600b00646b1651b29mr30550127pfl.23.1684135082331; Mon, 15 May 2023 00:18:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684135082; cv=none; d=google.com; s=arc-20160816; b=D99QSF1a2fnyLjzgJw5xoZOiacDDwLt2yMZZ1fZACyYor1YeZmyfaP7lsIoT8fRAgM WPszfQnp1ZV5YuROzsDhp8ZRvASdFBkARPw32iuWdOu1TJ59pDmDxNRthjh2G3sYbuCP 5w7LUdKDBIalbqC29HjzNoGYlrFlxpYdrXaPRHJS4Nw0nRxHZS5jflnaasYKhFJqYKKm VBwSw1qh3yyVHkYsKswjMoXWHa72ZdWYF3EoWDJorwQnyZ6Beib8ZblyFF2dO8RvOkBd eVFWZDFy0hzYnNIerse+9yJz7FlOIOrzfPM3IkETB6mkHhSPXbfjcwM9W5E/XzCldQVb vS4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=bZ7W17mQKu6WrRv+fOM+3WlFXHVU5loJzlrBxBg4ois=; b=f8xCwxnFEutWQI+iFuqJZcZ03aWRJF1WNhDOjr9qQNLKjLU0m6zDUj6yqQlTN3P/em cJdYZt5K88O1arlKzVhxKs2eClUO3Vibk7ZVQrtijRUNWtMDSdmOrb2p1FVlDJHG3EpU GjUPFcD7RNcgP+7h6sj5vjpG2XV2TQiJG95dhPPRG6KUi5d87OttntN4DU1Zs5+fTqx+ Wv47+vazc3GjTlosnWuA9vN+8iM0Z/fs5vuFl/CHgEzSbTG+Hz/ZPwf18EEdl20yze84 QEEBPY2j6rS8d1IaOyEcUmY8y/LvRRKETip+RfrHMMBCzPlJ/nK+zJYv8Et33Mn/4cJA k/0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j16-20020a63e750000000b0051fb6ca1e69si2800126pgk.180.2023.05.15.00.17.50; Mon, 15 May 2023 00:18:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240155AbjEOHCQ (ORCPT + 99 others); Mon, 15 May 2023 03:02:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239262AbjEOHCP (ORCPT ); Mon, 15 May 2023 03:02:15 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFCD5E60; Mon, 15 May 2023 00:02:13 -0700 (PDT) Received: from kwepemm600012.china.huawei.com (unknown [172.30.72.53]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4QKVYs0bBVz18LYW; Mon, 15 May 2023 14:57:53 +0800 (CST) Received: from build.huawei.com (10.175.101.6) by kwepemm600012.china.huawei.com (7.193.23.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 15 May 2023 15:02:09 +0800 From: Wenchao Hao To: "James E . J . Bottomley" , "Martin K . Petersen" , Ming Lei , , CC: , , Wenchao Hao Subject: [PATCH 0/2] Fix kernel panic in scsi_queue_rq() Date: Mon, 15 May 2023 15:01:54 +0800 Message-ID: <20230515070156.1790181-1-haowenchao2@huawei.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.101.6] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm600012.china.huawei.com (7.193.23.74) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 'cfee29ffb45b ("scsi: core: Do not increase scsi_device's iorequest_cnt if dispatch failed")' introduce bug which would cause kernel panic. So revert the changes and fix the origin issue by decreasing the iorequest_cnt if scsi_dispatch_cmd return failed. Wenchao Hao (2): Revert "scsi: core: Do not increase scsi_device's iorequest_cnt if dispatch failed" scsi: core: decrease scsi_device's iorequest_cnt if dispatch failed drivers/scsi/scsi_lib.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.32.0