linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Dmitry Osipenko <digetx@gmail.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Jens Axboe <axboe@kernel.dk>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-mmc <linux-mmc@vger.kernel.org>,
	linux-block <linux-block@vger.kernel.org>
Subject: Re: linux-next: Tree for Oct 25
Date: Tue, 26 Oct 2021 09:28:39 +0800	[thread overview]
Message-ID: <YXdZxzAPejKyE8Oi@T590> (raw)
In-Reply-To: <82bbf33e-918f-da01-95e6-9b2cc1b8b610@gmail.com>

On Tue, Oct 26, 2021 at 01:11:07AM +0300, Dmitry Osipenko wrote:
> Hello,
> 
> Recent -next has this new warning splat coming from MMC, please take a look.
> 
>  ------------[ cut here ]------------
>  WARNING: CPU: 0 PID: 525 at kernel/sched/core.c:9477 __might_sleep+0x65/0x68
>  do not call blocking ops when !TASK_RUNNING; state=2 set at [<4316eb02>] prepare_to_wait+0x2e/0xb8
>  Modules linked in:
>  CPU: 0 PID: 525 Comm: Xorg Tainted: G        W         5.15.0-rc6-next-20211025-00226-g89ccd6948ec3 #5
>  Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
>  (unwind_backtrace) from [<c01089f9>] (show_stack+0x11/0x14)
>  (show_stack) from [<c0afacb9>] (dump_stack_lvl+0x2b/0x34)
>  (dump_stack_lvl) from [<c011f689>] (__warn+0xa1/0xe8)
>  (__warn) from [<c0af6729>] (warn_slowpath_fmt+0x65/0x7c)
>  (warn_slowpath_fmt) from [<c01421b9>] (__might_sleep+0x65/0x68)
>  (__might_sleep) from [<c07eb377>] (mmc_blk_rw_wait+0x2f/0x118)
>  (mmc_blk_rw_wait) from [<c07eba11>] (mmc_blk_mq_issue_rq+0x219/0x71c)
>  (mmc_blk_mq_issue_rq) from [<c07ec199>] (mmc_mq_queue_rq+0xf9/0x200)
>  (mmc_mq_queue_rq) from [<c04ad247>] (__blk_mq_try_issue_directly+0xcb/0x100)
>  (__blk_mq_try_issue_directly) from [<c04adb89>] (blk_mq_request_issue_directly+0x2d/0x48)
>  (blk_mq_request_issue_directly) from [<c04adcf3>] (blk_mq_flush_plug_list+0x14f/0x1f4)
>  (blk_mq_flush_plug_list) from [<c04a5313>] (blk_flush_plug+0x83/0xb8)
>  (blk_flush_plug) from [<c0b013cb>] (io_schedule+0x2b/0x3c)
>  (io_schedule) from [<c0b01a17>] (bit_wait_io+0xf/0x48)

The following patch should fix the issue:

diff --git a/block/blk-mq.c b/block/blk-mq.c
index a71aeed7b987..bee9cb2a44cb 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2223,7 +2223,7 @@ void blk_mq_flush_plug_list(struct blk_plug *plug, bool from_schedule)
 		return;
 	plug->rq_count = 0;
 
-	if (!plug->multiple_queues && !plug->has_elevator) {
+	if (!plug->multiple_queues && !plug->has_elevator && !from_schedule) {
 		blk_mq_plug_issue_direct(plug, from_schedule);
 		if (rq_list_empty(plug->mq_list))
 			return;

-- 
Ming


  reply	other threads:[~2021-10-26  1:28 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25  9:49 linux-next: Tree for Oct 25 Stephen Rothwell
2021-10-25 20:50 ` linux-next: Tree for Oct 25 (drivers/platform/x86/amd-pmc.c) Randy Dunlap
2021-10-25 21:29   ` Hans de Goede
2021-10-25 21:32     ` Limonciello, Mario
2021-10-26  7:55       ` Hans de Goede
2021-10-25 22:11 ` linux-next: Tree for Oct 25 Dmitry Osipenko
2021-10-26  1:28   ` Ming Lei [this message]
2021-10-26  8:40     ` Dmitry Osipenko
2021-10-26  3:20 ` linux-next: Tree for Oct 25 (bootconfig: xbc_alloc_mem()) Randy Dunlap
2021-10-26  5:11   ` Stephen Rothwell
2021-10-27 11:42 ` linux-next: Tree for Oct 25 Stephen Rothwell
2021-10-27 12:54   ` Greg Kroah-Hartman
2021-10-28  1:51   ` Xianting Tian
2021-10-28  4:51     ` Stephen Rothwell
2021-10-28  7:59       ` Xianting Tian
2021-10-28 12:48         ` Stephen Rothwell
2021-10-28 12:54           ` Xianting Tian
  -- strict thread matches above, loose matches on Subject: below --
2023-10-25  5:37 Stephen Rothwell
2022-10-25  4:20 Stephen Rothwell
2019-10-25  5:45 Stephen Rothwell
2016-10-25  3:31 Stephen Rothwell
2016-10-26  1:09 ` Paul Gortmaker
2016-10-27  6:21   ` Daniel Vetter
2013-10-25 15:03 Thierry Reding
2013-10-25 21:01 ` Guenter Roeck
2013-10-25 22:31 ` Randy Dunlap
2013-10-26 16:59   ` Mark Brown
2013-10-28  8:01   ` Thierry Reding
2013-10-28 16:53     ` Mark Brown
2012-10-25  4:01 Stephen Rothwell
2011-10-25  9:36 Stephen Rothwell
2011-10-25  9:43 ` Stephen Rothwell
2011-10-25 10:42 ` Stephen Rothwell

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=YXdZxzAPejKyE8Oi@T590 \
    --to=ming.lei@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=axboe@kernel.dk \
    --cc=digetx@gmail.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=ulf.hansson@linaro.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).