From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31447C43381 for ; Sun, 24 Mar 2019 20:15:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F1EB32082F for ; Sun, 24 Mar 2019 20:15:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553458553; bh=daC6BYvQn2nXpMCPaJqEDbEIalJGyLBx/nijdMZdZFA=; h=Subject:To:Cc:From:Date:List-ID:From; b=XSh4SkNAh4LXYeFcnLfIqE4Q8Jji1H9pb/kZyFvuoqu6RTRw/y0GYJBe/GS5vQfuG KC+PDj0Y+n87ru1XUY/VHodm+v9j7XDzW1EEIi3SjlM+LQrGIbyzeWUr7bThffG+PW BNgqZtivRTogFJaIkM8/PtRhyyfR//xlFHunsbWc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728880AbfCXUPw (ORCPT ); Sun, 24 Mar 2019 16:15:52 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:37103 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726317AbfCXUPw (ORCPT ); Sun, 24 Mar 2019 16:15:52 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id DC10620F20; Sun, 24 Mar 2019 16:15:51 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sun, 24 Mar 2019 16:15:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=eUu8xX t/lFrjlKymmEWb7JKhGQOh4gyEsHdM0sj5Aj4=; b=enTsL1AUU9Cw0iEk6Btz1x HFD8BN2pXuIUkY+jEKPAWHgYqCse4IMSuOiZvoOE2R+kQfU1QNWiyZFVQW2Gs3gQ A/2zcfk6cKI4TbhAuQ7UdjxQUnUqJBEYU0LneNh46IxkXKfWxOH64F6E9+R4+K+z Mda7zG8RtMXbbbhYTI6NfxkEbVjtKDhVo1zQmsq9ajDKv+ygVMs31nmjrLzj5kEw ZGOaCfTusSTGrNL5aJEEv3ihljD9XxXDVGTtaQKz0Mw68qsFTmWPvh7OYcSKYqWt r6ZU84njc15Be9ncOpnzNNRnbV/R80D2juguX32zjNNBTn3ymAm/h96gsHknopzQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrjeeigddufeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtlfenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecukfhppeekkedruddvkedrkedtrddukeelnecurfgrrhgrmhepmhgrihhlfhhroh hmpehgrhgvgheskhhrohgrhhdrtghomhenucevlhhushhtvghrufhiiigvpedu X-ME-Proxy: Received: from localhost (unknown [88.128.80.189]) by mail.messagingengine.com (Postfix) with ESMTPA id 2A97710315; Sun, 24 Mar 2019 16:15:50 -0400 (EDT) Subject: FAILED: patch "[PATCH] scsi: core: Avoid that a kernel warning appears during system" failed to apply to 4.14-stable tree To: bvanassche@acm.org, Jisheng.Zhang@synaptics.com, hare@suse.com, hch@lst.de, jthumshirn@suse.de, martin.petersen@oracle.com, martin@lichtvoll.de, ming.lei@redhat.com, oleksandr@natalenko.name, stable@vger.kernel.org Cc: From: Date: Sun, 24 Mar 2019 21:11:28 +0100 Message-ID: <1553458288113248@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.14-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 17605afaae825b0291f80c62a7f6565879edaa8a Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 15 Mar 2019 16:27:58 -0700 Subject: [PATCH] scsi: core: Avoid that a kernel warning appears during system resume Since scsi_device_quiesce() skips SCSI devices that have another state than RUNNING, OFFLINE or TRANSPORT_OFFLINE, scsi_device_resume() should not complain about SCSI devices that have been skipped. Hence this patch. This patch avoids that the following warning appears during resume: WARNING: CPU: 3 PID: 1039 at blk_clear_pm_only+0x2a/0x30 CPU: 3 PID: 1039 Comm: kworker/u8:49 Not tainted 5.0.0+ #1 Hardware name: LENOVO 4180F42/4180F42, BIOS 83ET75WW (1.45 ) 05/10/2013 Workqueue: events_unbound async_run_entry_fn RIP: 0010:blk_clear_pm_only+0x2a/0x30 Call Trace: ? scsi_device_resume+0x28/0x50 ? scsi_dev_type_resume+0x2b/0x80 ? async_run_entry_fn+0x2c/0xd0 ? process_one_work+0x1f0/0x3f0 ? worker_thread+0x28/0x3c0 ? process_one_work+0x3f0/0x3f0 ? kthread+0x10c/0x130 ? __kthread_create_on_node+0x150/0x150 ? ret_from_fork+0x1f/0x30 Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Ming Lei Cc: Johannes Thumshirn Cc: Oleksandr Natalenko Cc: Martin Steigerwald Cc: Reported-by: Jisheng Zhang Tested-by: Jisheng Zhang Fixes: 3a0a529971ec ("block, scsi: Make SCSI quiesce and resume work reliably") # v4.15 Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index f0db2dd0be75..601b9f1de267 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -2548,8 +2548,10 @@ void scsi_device_resume(struct scsi_device *sdev) * device deleted during suspend) */ mutex_lock(&sdev->state_mutex); - sdev->quiesced_by = NULL; - blk_clear_pm_only(sdev->request_queue); + if (sdev->quiesced_by) { + sdev->quiesced_by = NULL; + blk_clear_pm_only(sdev->request_queue); + } if (sdev->sdev_state == SDEV_QUIESCE) scsi_device_set_state(sdev, SDEV_RUNNING); mutex_unlock(&sdev->state_mutex);