From 7fc5d61c8bd73fa439a7a54f7a4ae16c0028233a Mon Sep 17 00:00:00 2001 From: zhong jiang Date: Sun, 31 Mar 2019 19:30:14 +0800 Subject: [PATCH] pagecache: Use correct 'cpu' to deal with the background work. euler inclusion category: bugfix CVE: NA Bugzilla: 13084 --------------------------- When user modify the cache_reclaim_s, cache_reclaim_sysctl_handler will modify the work delay time. we fail to initialize the 'cpu'. The patch should mod_delayed_work instead of mod_delayed_work to fix the issue. Signed-off-by: zhong jiang Reviewed-by: Jing Xiangfeng Signed-off-by: Yang Yingliang --- mm/vmscan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index a67af1d8e8ba..a4dbe8068b76 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -4049,14 +4049,14 @@ int cache_reclaim_enable_handler(struct ctl_table *table, int write, int cache_reclaim_sysctl_handler(struct ctl_table *table, int write, void __user *buffer, size_t *length, loff_t *ppos) { - int ret, cpu; + int ret; ret = proc_dointvec_minmax(table, write, buffer, length, ppos); if (ret) return ret; if (write) - mod_delayed_work_on(cpu, system_wq, &shepherd, + mod_delayed_work(system_wq, &shepherd, round_jiffies_relative( (unsigned long)vm_cache_reclaim_s * HZ)); -- GitLab