archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <>
To: Christoph Hellwig <>
Cc: syzbot <>,,,,,,,,,,,,,,
Subject: Re: WARNING in submit_bio_checks
Date: Mon, 13 Jul 2020 09:16:14 -0700	[thread overview]
Message-ID: <20200713161614.GC1696@sol.localdomain> (raw)
In-Reply-To: <>

On Mon, Jul 13, 2020 at 11:18:36AM +0100, Christoph Hellwig wrote:
> On Fri, Jul 10, 2020 at 10:34:19PM -0700, syzbot wrote:
> > Hello,
> > 
> > syzbot found the following crash on:
> This is not a crash, but a WARN_ONCE.  A pre-existing one that just
> slightly changed the printed message recently.

It doesn't really matter.  WARN is for indicating kernel bugs only.
A user-triggable WARN is a bug.  Either the bug that makes the WARN
reachable needs to be fixed, or if the WARN is legitimately user-reachable
it needs to be removed or replaced with a proper ratelimited log message.

This one looks legitimately user-reachable, so we could do:

diff --git a/block/blk-core.c b/block/blk-core.c
index d9d632639bd1..354c51ad5c81 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -854,8 +854,8 @@ static inline bool bio_check_ro(struct bio *bio, struct hd_struct *part)
 		if (op_is_flush(bio->bi_opf) && !bio_sectors(bio))
 			return false;
-		       "Trying to write to read-only block-device %s (partno %d)\n",
+		pr_warn_ratelimited(
+		       "block: trying to write to read-only block-device %s (partno %d)\n",
 			bio_devname(bio, b), part->partno);
 		/* Older lvm-tools actually trigger this */
 		return false;

We could also show current->comm and current->pid if they would be useful here.

And yes, this is preexisting which is why syzbot has reported this before
Just no one has bothered to fix it yet.

- Eric

  reply	other threads:[~2020-07-13 16:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-11  5:34 WARNING in submit_bio_checks syzbot
2020-07-13 10:18 ` Christoph Hellwig
2020-07-13 16:16   ` Eric Biggers [this message]
2020-07-16  5:00 ` syzbot
2021-09-03  7:41 Hao Sun

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200713161614.GC1696@sol.localdomain \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

* 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).