From dbb0f5abce95e1a9c86a92551d5fdf8879c75185 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 27 Nov 2019 13:35:57 +0100 Subject: [PATCH] fix up 4.14 cpufreq commit --- ...checks-to-show-and-store-methods-of-cpufreq.patch | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/queue-4.14/cpufreq-add-null-checks-to-show-and-store-methods-of-cpufreq.patch b/queue-4.14/cpufreq-add-null-checks-to-show-and-store-methods-of-cpufreq.patch index 7cc2a62dabe..08a2626a7f7 100644 --- a/queue-4.14/cpufreq-add-null-checks-to-show-and-store-methods-of-cpufreq.patch +++ b/queue-4.14/cpufreq-add-null-checks-to-show-and-store-methods-of-cpufreq.patch @@ -44,13 +44,13 @@ Signed-off-by: Greg Kroah-Hartman down_read(&policy->rwsem); ret = fattr->show(policy, buf); up_read(&policy->rwsem); -@@ -1139,6 +1142,9 @@ static void cpufreq_policy_put_kobj(stru - up_write(&policy->rwsem); - kobject_put(kobj); +@@ -925,6 +928,9 @@ static ssize_t store(struct kobject *kob + struct freq_attr *fattr = to_attr(attr); + ssize_t ret = -EINVAL; + if (!fattr->store) + return -EIO; + - /* - * We need to make sure that the underlying kobj is - * actually not referenced anymore by anybody before we + cpus_read_lock(); + + if (cpu_online(policy->cpu)) { -- 2.47.3