Skip to content

Commit 089930f

Browse files
Tetsuo Handagregkh
authored andcommitted
block: ratelimit handle_bad_sector() message
[ Upstream commit f4ac712 ] syzbot is reporting unkillable task [1], for the caller is failing to handle a corrupted filesystem image which attempts to access beyond the end of the device. While we need to fix the caller, flooding the console with handle_bad_sector() message is unlikely useful. [1] https://syzkaller.appspot.com/bug?id=f1f49fb971d7a3e01bd8ab8cff2ff4572ccf3092 Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 9b0d1c5 commit 089930f

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

‎block/blk-core.c‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -803,11 +803,10 @@ static void handle_bad_sector(struct bio *bio, sector_t maxsector)
803803
{
804804
char b[BDEVNAME_SIZE];
805805

806-
printk(KERN_INFO "attempt to access beyond end of device\n");
807-
printk(KERN_INFO "%s: rw=%d, want=%Lu, limit=%Lu\n",
808-
bio_devname(bio, b), bio->bi_opf,
809-
(unsigned long long)bio_end_sector(bio),
810-
(long long)maxsector);
806+
pr_info_ratelimited("attempt to access beyond end of device\n"
807+
"%s: rw=%d, want=%llu, limit=%llu\n",
808+
bio_devname(bio, b), bio->bi_opf,
809+
bio_end_sector(bio), maxsector);
811810
}
812811

813812
#ifdef CONFIG_FAIL_MAKE_REQUEST

0 commit comments

Comments
 (0)