summaryrefslogtreecommitdiff
path: root/drivers/hv/hv_balloon.c
diff options
context:
space:
mode:
authorShradha Gupta <shradhagupta@linux.microsoft.com>2022-09-30 09:01:38 +0300
committerWei Liu <wei.liu@kernel.org>2022-11-28 19:48:19 +0300
commitaebb02ce8b36d20464404206b89069dc9239a7f0 (patch)
tree1d7225555869eec2f5c4045dcc744f01d02bf374 /drivers/hv/hv_balloon.c
parentb7b275e60bcd5f89771e865a8239325f86d9927d (diff)
downloadlinux-aebb02ce8b36d20464404206b89069dc9239a7f0.tar.xz
mm/page_reporting: Add checks for page_reporting_order param
Current code allows the page_reporting_order parameter to be changed via sysfs to any integer value. The new value is used immediately in page reporting code with no validation, which could cause incorrect behavior. Fix this by adding validation of the new value. Export this parameter for use in the driver that is calling the page_reporting_register(). This is needed by drivers like hv_balloon to know the order of the pages reported. Traditionally the values provided in the kernel boot line or subsequently changed via sysfs take priority therefore, if page_reporting_order parameter's value is set, it takes precedence over the value passed while registering with the driver. Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com> Reviewed-by: Michael Kelley <mikelley@microsoft.com> Acked-by: Andrew Morton <akpm@linux-foundation.org> Link: https://lore.kernel.org/r/1664517699-1085-2-git-send-email-shradhagupta@linux.microsoft.com Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'drivers/hv/hv_balloon.c')
0 files changed, 0 insertions, 0 deletions