[folded-merged] mm-fix-div-by-zero-in-bdi_ratio_from_pages-v2.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The quilt patch titled
     Subject: mm-fix-div-by-zero-in-bdi_ratio_from_pages-v2
has been removed from the -mm tree.  Its filename was
     mm-fix-div-by-zero-in-bdi_ratio_from_pages-v2.patch

This patch was dropped because it was folded into mm-fix-div-by-zero-in-bdi_ratio_from_pages.patch

------------------------------------------------------
From: Stefan Roesch <shr@xxxxxxxxxxxx>
Subject: mm-fix-div-by-zero-in-bdi_ratio_from_pages-v2
Date: Tue, 7 Jan 2025 17:47:23 -0800


check for -EINVAL in bdi_set_min_bytes() and bdi_set_max_bytes()

Link: https://lkml.kernel.org/r/20250108014723.166637-1-shr@xxxxxxxxxxxx
Reported-by: cheung wall <zzqq0103.hey@xxxxxxxxx>
Closes: https://lore.kernel.org/linux-mm/87pll35yd0.fsf@xxxxxxxxxxxx/T/#t
Signed-off-by: Stefan Roesch <shr@xxxxxxxxxxxx>
Cc: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/page-writeback.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/mm/page-writeback.c~mm-fix-div-by-zero-in-bdi_ratio_from_pages-v2
+++ a/mm/page-writeback.c
@@ -799,6 +799,8 @@ int bdi_set_min_bytes(struct backing_dev
 		return ret;
 
 	min_ratio = bdi_ratio_from_pages(pages);
+	if (min_ratio == -EINVAL)
+		return -EINVAL;
 	return __bdi_set_min_ratio(bdi, min_ratio);
 }
 
@@ -818,6 +820,8 @@ int bdi_set_max_bytes(struct backing_dev
 		return ret;
 
 	max_ratio = bdi_ratio_from_pages(pages);
+	if (max_ratio == -EINVAL)
+		return -EINVAL;
 	return __bdi_set_max_ratio(bdi, max_ratio);
 }
 
_

Patches currently in -mm which might be from shr@xxxxxxxxxxxx are

mm-fix-div-by-zero-in-bdi_ratio_from_pages.patch
mm-fix-div-by-zero-in-bdi_ratio_from_pages-v3.patch





[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux