From: Greg Kroah-Hartman Date: Tue, 10 May 2022 11:19:16 +0000 (+0200) Subject: 5.10-stable patches X-Git-Tag: v4.9.313~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d4da0f71da68ddce3e921d62f5c78546e714eb54;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: block-map-add-__gfp_zero-flag-for-alloc_page-in-function-bio_copy_kern.patch --- diff --git a/queue-5.10/block-map-add-__gfp_zero-flag-for-alloc_page-in-function-bio_copy_kern.patch b/queue-5.10/block-map-add-__gfp_zero-flag-for-alloc_page-in-function-bio_copy_kern.patch new file mode 100644 index 00000000000..cc143941506 --- /dev/null +++ b/queue-5.10/block-map-add-__gfp_zero-flag-for-alloc_page-in-function-bio_copy_kern.patch @@ -0,0 +1,35 @@ +From cc8f7fe1f5eab010191aa4570f27641876fa1267 Mon Sep 17 00:00:00 2001 +From: Haimin Zhang +Date: Wed, 16 Feb 2022 16:40:38 +0800 +Subject: block-map: add __GFP_ZERO flag for alloc_page in function bio_copy_kern + +From: Haimin Zhang + +commit cc8f7fe1f5eab010191aa4570f27641876fa1267 upstream. + +Add __GFP_ZERO flag for alloc_page in function bio_copy_kern to initialize +the buffer of a bio. + +Signed-off-by: Haimin Zhang +Reviewed-by: Chaitanya Kulkarni +Reviewed-by: Christoph Hellwig +Link: https://lore.kernel.org/r/20220216084038.15635-1-tcs.kernel@gmail.com +Signed-off-by: Jens Axboe +[nobelbarakat: Backported to 5.10: Manually added flag] +Signed-off-by: Nobel Barakat +Signed-off-by: Greg Kroah-Hartman +--- + block/blk-map.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/block/blk-map.c ++++ b/block/blk-map.c +@@ -488,7 +488,7 @@ static struct bio *bio_copy_kern(struct + if (bytes > len) + bytes = len; + +- page = alloc_page(q->bounce_gfp | gfp_mask); ++ page = alloc_page(q->bounce_gfp | __GFP_ZERO | gfp_mask); + if (!page) + goto cleanup; + diff --git a/queue-5.10/series b/queue-5.10/series index 371fadb6018..f2a191bc90d 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -65,3 +65,4 @@ kvm-x86-mmu-avoid-null-pointer-dereference-on-page-f.patch kvm-lapic-enable-timer-posted-interrupt-only-when-mw.patch rcu-fix-callbacks-processing-time-limit-retaining-cond_resched.patch rcu-apply-callbacks-processing-time-limit-only-on-softirq.patch +block-map-add-__gfp_zero-flag-for-alloc_page-in-function-bio_copy_kern.patch