[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200713161614.GC1696@sol.localdomain>
Date: Mon, 13 Jul 2020 09:16:14 -0700
From: Eric Biggers <ebiggers@...nel.org>
To: Christoph Hellwig <hch@...radead.org>
Cc: syzbot <syzbot+4c50ac32e5b10e4133e1@...kaller.appspotmail.com>,
andriin@...com, ast@...nel.org, axboe@...nel.dk,
bpf@...r.kernel.org, daniel@...earbox.net,
john.fastabend@...il.com, kafai@...com, kpsingh@...omium.org,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, songliubraving@...com,
syzkaller-bugs@...glegroups.com, yhs@...com
Subject: Re: WARNING in submit_bio_checks
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;
- WARN_ONCE(1,
- "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
(https://syzkaller.appspot.com/bug?id=79eda145ab047a0dc7d03ca5fcb1cf12206eb481).
Just no one has bothered to fix it yet.
- Eric
Powered by blists - more mailing lists