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 23B07C43381 for ; Sun, 24 Mar 2019 20:16:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E3E652082F for ; Sun, 24 Mar 2019 20:16:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553458563; bh=bjJ8cr/6B5vMJBsFAGSwPMF7tmilr0yvmdeCzwmwNHU=; h=Subject:To:Cc:From:Date:List-ID:From; b=IdKraacvn6k2e65LlE8KAPvom3cLQirLiNlts/bGnXF5FsfNvUCso04VEq1oHQ8hy nvY5dE11q3uWjomBrC8O8iQpNMi95SObZWVFYuxSBm2V4fTt5bbQy2GPOJUbiVSZ+q Lv71KpyKDgwjEM5oD9VKzavOU846togyxpzayZJE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728882AbfCXUQC (ORCPT ); Sun, 24 Mar 2019 16:16:02 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:60227 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726317AbfCXUQC (ORCPT ); Sun, 24 Mar 2019 16:16:02 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id D4A732125E; Sun, 24 Mar 2019 16:16:01 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sun, 24 Mar 2019 16:16:01 -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=bDSDoR XYfotYQfwaAhIY6UPbFoa7rtSkKRfGgFG7pWI=; b=iZ2irtTNgbMPS9NOoemjyM vE1sAyFkLlgC6PlVcBX0e/ML2z4OClXRmWoZYcfsvmN8DopBx+KUridqC8TPjfui kQGgBsrLgH6Pi7mu6h3ixLb9c3AQgS+sMrjeb9lj+6hu/wb08hlt1luvuNNkby5m 0WgWFP2UGklsQJnyszrh+zkzvFfGy87H9VluMiN9WYUNOEVJHt/4tL6oF3irgOp6 SUmUhy7po7piLfgB1/m8XkVu//xMv7cYsas2C5ClQHbhHvBYVJ5YKPVPCWqi1oI+ pzqnSr0pGwJ2jK6n4fTY8jh6z4xJYKK3CKW966eajbW8IC2VwWobJKLoZ7ibd9gg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrjeeigddufeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtlfenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecukfhppeekkedruddvkedrkedtrddukeelnecurfgrrhgrmhepmhgrihhlfhhroh hmpehgrhgvgheskhhrohgrhhdrtghomhenucevlhhushhtvghrufhiiigvpedv X-ME-Proxy: Received: from localhost (unknown [88.128.80.189]) by mail.messagingengine.com (Postfix) with ESMTPA id 1CFDB10319; Sun, 24 Mar 2019 16:16:00 -0400 (EDT) Subject: FAILED: patch "[PATCH] scsi: core: Avoid that a kernel warning appears during system" failed to apply to 4.4-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:29 +0100 Message-ID: <155345828910838@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.4-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);