From 73bb3bb9503098699c2dbf67199b02a1e071b8d8 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 1 Nov 2020 11:46:20 +0100 Subject: [PATCH] 4.19-stable patches added patches: revert-block-ratelimit-handle_bad_sector-message.patch --- ...-ratelimit-handle_bad_sector-message.patch | 63 +++++++++++++++++++ queue-4.19/series | 1 + 2 files changed, 64 insertions(+) create mode 100644 queue-4.19/revert-block-ratelimit-handle_bad_sector-message.patch diff --git a/queue-4.19/revert-block-ratelimit-handle_bad_sector-message.patch b/queue-4.19/revert-block-ratelimit-handle_bad_sector-message.patch new file mode 100644 index 00000000000..d1a5f2b7d34 --- /dev/null +++ b/queue-4.19/revert-block-ratelimit-handle_bad_sector-message.patch @@ -0,0 +1,63 @@ +From 2a2b435ca40a18fe9fa663f371988f2d4c468d8b Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Sun, 1 Nov 2020 11:42:18 +0100 +Subject: Revert "block: ratelimit handle_bad_sector() message" + +From: Greg Kroah-Hartman + +This reverts commit f86b9bf6228bb334fe1addcd566a658ecbd08f7e which is +commit f4ac712e4fe009635344b9af5d890fe25fcc8c0d upstream. + +Jari Ruusu writes: + + Above change "block: ratelimit handle_bad_sector() message" + upstream commit f4ac712e4fe009635344b9af5d890fe25fcc8c0d + in 4.19.154 kernel is not completely OK. + + Removing casts from arguments 4 and 5 produces these compile warnings: + + ... + + For 64 bit systems it is only compile time cosmetic warning. For 32 bit + system + CONFIG_LBDAF=n it introduces bugs: output formats are "%llu" and + passed parameters are 32 bits. That is not OK. + + Upstream kernels have hardcoded 64 bit sector_t. In older stable trees + sector_t can be either 64 or 32 bit. In other words, backport of above patch + needs to keep those original casts. + +And Tetsuo Handa writes: + Indeed, commit f4ac712e4fe00963 ("block: ratelimit handle_bad_sector() message") + depends on commit 72deb455b5ec619f ("block: remove CONFIG_LBDAF") which was merged + into 5.2 kernel. + +So let's revert it. + +Reported-by: Jari Ruusu +Reported-by: Tetsuo Handa +Cc: Christoph Hellwig +Cc: Jens Axboe +Cc: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + block/blk-core.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +--- a/block/blk-core.c ++++ b/block/blk-core.c +@@ -2127,10 +2127,11 @@ static void handle_bad_sector(struct bio + { + char b[BDEVNAME_SIZE]; + +- pr_info_ratelimited("attempt to access beyond end of device\n" +- "%s: rw=%d, want=%llu, limit=%llu\n", +- bio_devname(bio, b), bio->bi_opf, +- bio_end_sector(bio), maxsector); ++ printk(KERN_INFO "attempt to access beyond end of device\n"); ++ printk(KERN_INFO "%s: rw=%d, want=%Lu, limit=%Lu\n", ++ bio_devname(bio, b), bio->bi_opf, ++ (unsigned long long)bio_end_sector(bio), ++ (long long)maxsector); + } + + #ifdef CONFIG_FAIL_MAKE_REQUEST diff --git a/queue-4.19/series b/queue-4.19/series index c1f424bf45a..57c4d4fa309 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -32,3 +32,4 @@ fscrypt-fix-race-allowing-rename-and-link-of-ciphertext-dentries.patch fs-fscrypt-clear-dcache_encrypted_name-when-unaliasing-directory.patch fscrypt-only-set-dentry_operations-on-ciphertext-dentries.patch fscrypt-fix-race-where-lookup-marks-plaintext-dentry-as-ciphertext.patch +revert-block-ratelimit-handle_bad_sector-message.patch -- 2.47.3