From: Martin Steigerwald <martin@lichtvoll.de>
To: Bart Van Assche <bvanassche@acm.org>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>,
"James E . J . Bottomley" <jejb@linux.vnet.ibm.com>,
linux-scsi@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
Christoph Hellwig <hch@lst.de>, Hannes Reinecke <hare@suse.com>,
Ming Lei <ming.lei@redhat.com>,
Johannes Thumshirn <jthumshirn@suse.de>,
Oleksandr Natalenko <oleksandr@natalenko.name>,
stable@vger.kernel.org,
Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Subject: Re: [PATCH] Avoid that a kernel warning appears during system resume
Date: Sat, 16 Mar 2019 11:43:11 +0100 [thread overview]
Message-ID: <4337330.mz4Gj9yf0O@merkaba> (raw)
In-Reply-To: <20190315232758.221199-1-bvanassche@acm.org>
Hi Bart.
Bart Van Assche - 16.03.19, 00:27:
> 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:
Am I on CC cause one of those warnings appeared in bug reports from me
from quite some time ago?
> 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 )
This at least does not appear to be this ThinkPad T520, as I have BIOS
version 1.49 already.
Thanks and have good weekend,
Martin
> 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 <hch@lst.de>
> Cc: Hannes Reinecke <hare@suse.com>
> Cc: Ming Lei <ming.lei@redhat.com>
> Cc: Johannes Thumshirn <jthumshirn@suse.de>
> Cc: Oleksandr Natalenko <oleksandr@natalenko.name>
> Cc: Martin Steigerwald <martin@lichtvoll.de>
> Cc: <stable@vger.kernel.org>
> Reported-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
> Tested-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
> Fixes: 3a0a529971ec ("block, scsi: Make SCSI quiesce and resume work
> reliably") # v4.15 Signed-off-by: Bart Van Assche
> <bvanassche@acm.org>
> ---
> drivers/scsi/scsi_lib.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> index 324f830ee9fa..54ad751b42b8 100644
> --- a/drivers/scsi/scsi_lib.c
> +++ b/drivers/scsi/scsi_lib.c
> @@ -2541,8 +2541,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);
--
Martin
next prev parent reply other threads:[~2019-03-16 10:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-15 23:27 [PATCH] Avoid that a kernel warning appears during system resume Bart Van Assche
2019-03-16 10:43 ` Martin Steigerwald [this message]
2019-03-16 21:28 ` Bart Van Assche
2019-03-17 14:20 ` Martin Steigerwald
2019-03-17 17:19 ` Bart Van Assche
2019-03-19 18:27 ` Martin K. Petersen
[not found] ` <20190325003830.8BA272147C@mail.kernel.org>
2019-03-25 4:47 ` Bart Van Assche
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4337330.mz4Gj9yf0O@merkaba \
--to=martin@lichtvoll.de \
--cc=Jisheng.Zhang@synaptics.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=hare@suse.com \
--cc=hch@lst.de \
--cc=jejb@linux.vnet.ibm.com \
--cc=jthumshirn@suse.de \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=ming.lei@redhat.com \
--cc=oleksandr@natalenko.name \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).