Re: [PATCH v3] sched/numa: Fix divide by zero for sysctl_numa_balancing_scan_size.

From: chris hyser
Date: Thu Apr 06 2023 - 11:30:47 EST


On 4/6/23 02:56, Chen Yu wrote:
On 2023-04-04 at 14:29:15 -0400, chris hyser wrote:
Commit 6419265899d9 ("sched/fair: Fix division by zero
sysctl_numa_balancing_scan_size") prevented a divide by zero by using
sysctl mechanisms to return EINVAL for a sysctl_numa_balancing_scan_size
value of zero. When moved from a sysctl to a debugfs file, this checking
was lost.

This patch puts zero checking back in place.

Maybe add a tag
Fixes: 8a99b6833c88 ("sched: Move SCHED_DEBUG sysctl to debugfs")

Yes, you are correct. I should have reviewed the patch submitter doc. Also seems like a Cc: to stable is appropriate.

Signed-off-by: Chris Hyser <chris.hyser@xxxxxxxxxx>

Other than that,
Tested-by: Chen Yu <yu.c.chen@xxxxxxxxx>

thanks,
Chenyu

Thank you. Changes made and sent as v4.

-chrish