]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fix up 4.14 cpufreq commit
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Nov 2019 12:35:57 +0000 (13:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Nov 2019 12:35:57 +0000 (13:35 +0100)
queue-4.14/cpufreq-add-null-checks-to-show-and-store-methods-of-cpufreq.patch

index 7cc2a62dabec2f5681489a7189daa6d0432dbd81..08a2626a7f773bf9c17bc26e6c4c5d07df42d816 100644 (file)
@@ -44,13 +44,13 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        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)) {