From patchwork Tue Apr 2 16:16:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10882057 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 518E6139A for ; Tue, 2 Apr 2019 16:16:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39F6028740 for ; Tue, 2 Apr 2019 16:16:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 29E4528751; Tue, 2 Apr 2019 16:16:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16BFC28750 for ; Tue, 2 Apr 2019 16:16:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730032AbfDBQQc (ORCPT ); Tue, 2 Apr 2019 12:16:32 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:46575 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729772AbfDBQQc (ORCPT ); Tue, 2 Apr 2019 12:16:32 -0400 Received: by mail-pl1-f195.google.com with SMTP id y6so6505769pll.13 for ; Tue, 02 Apr 2019 09:16:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RjKsSUEqYDOlNCGaWFiK3lZOStg+eiujwNm29gdTK6c=; b=aMTPpVLYmwbinR5tfHbC0ipPmmL0TH4GTLJeIB5CYefXE2OXKVzQY6SRagTPRtI6Pt zMhjJ7ekH+JSMf0taPyYnJx9N/dzYmQmc+ccCiOHXx1tyDigjfWoz/5frXJailzfmcqx cNDc6Kww8hheo+9HLwp1YhMAzAYNA3eSNaP881yUrV0TQKCpbwuVMabx17YZ90ta7jtt 08FH0pC58gaaGwva3Qb4HLTB1XmKau7vqiEcDOF3s7esnQPZfB1Jugyn2SpdYiI0lt9r uefdXjUnXSVoTkMQXMFzG1nEGfjJER9WnraR2VdvmkOJVuFGvvDJolVO9yAs4kFJqMJ9 PJig== X-Gm-Message-State: APjAAAWJsIJ2hlNuraFkhOcKbWZDR/FH0SfkMcqNgkEjl546COZYYGSI Gnte/Z1bj+nVEtn3jI+PlFO3HRog X-Google-Smtp-Source: APXvYqzv45nhhC1inS5JDM5hK8+Ym1mI5tHuGwZhbEBOx8YypvIRWlJUBDWWQ37lUDyaL/eWuUt5Iw== X-Received: by 2002:a17:902:b68e:: with SMTP id c14mr20211778pls.49.1554221791923; Tue, 02 Apr 2019 09:16:31 -0700 (PDT) Received: from desktop-bart.svl.corp.google.com ([2620:15c:2cd:203:5cdc:422c:7b28:ebb5]) by smtp.gmail.com with ESMTPSA id 26sm19150473pfj.93.2019.04.02.09.16.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Apr 2019 09:16:30 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche Subject: [PATCH v2 0/2] Avoid that .queuecommand() gets called for a quiesced SCSI device Date: Tue, 2 Apr 2019 09:16:22 -0700 Message-Id: <20190402161624.148359-1-bvanassche@acm.org> X-Mailer: git-send-email 2.20.GIT MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Martin, As explained in a recent LSF/MM topic proposal, it can happen that the SCSI error handler calls .queuecommand() for a quiesced SCSI device. SCSI LLDs do not expect this. Hence this patch series. Please consider this series for kernel v5.2. Thanks, Bart. Changes compared to v1: - Changed SDEV_QUIESCE into SDEV_BLOCK in patch 1/2. Bart Van Assche (2): scsi: Avoid that .queuecommand() gets called for a quiesced SCSI device RDMA/srp: Fix a sleep-in-invalid-context bug drivers/infiniband/ulp/srp/ib_srp.c | 21 ++------------------- drivers/scsi/scsi_error.c | 26 ++++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 21 deletions(-)