All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]cpufreq: add NULL check to the store method of cpufreq
@ 2019-11-06  7:46 Shen Kai
  2019-11-06 12:32 ` Rafael J. Wysocki
  0 siblings, 1 reply; 10+ messages in thread
From: Shen Kai @ 2019-11-06  7:46 UTC (permalink / raw)
  To: viresh.kumar, rjw; +Cc: hushiyuan, linfeilong, linux-pm

From: shenkai <shenkai8@huawei.com>

Add NULL check in the store function here to avoid NULL callback invoking.
Though some interfaces of cpufreq are set as read-only, user can still get 
write permission using chmod which can lead to a kernel crash.

The following operations can lead to a kernel crash.

chmod +w /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
echo 1 >  /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq

This bug was found on linux 4.19

Signed-off-by: shenkai <shenkai8@huawei.com>
Reported-by: linfeilong <linfeilong@huawei.com>
Reviewed-by: linfeilong <linfeilong@huawei.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/cpufreq.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index bffc11b..4ccaa96 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -947,6 +947,9 @@ static ssize_t store(struct kobject *kobj, struct attribute *attr,
 	struct freq_attr *fattr = to_attr(attr);
 	ssize_t ret = -EINVAL;
 
+	if (!fattr->store)
+		return ret;
+
 	/*
 	 * cpus_read_trylock() is used here to work around a circular lock
 	 * dependency problem with respect to the cpufreq_register_driver().
-- 
2.6.4.windows.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH]cpufreq: add NULL check to the store method of cpufreq
  2019-11-06  7:46 [PATCH]cpufreq: add NULL check to the store method of cpufreq Shen Kai
@ 2019-11-06 12:32 ` Rafael J. Wysocki
  2019-11-07  1:53   ` Shen Kai
  0 siblings, 1 reply; 10+ messages in thread
From: Rafael J. Wysocki @ 2019-11-06 12:32 UTC (permalink / raw)
  To: Shen Kai; +Cc: Viresh Kumar, Rafael J. Wysocki, hushiyuan, linfeilong, Linux PM

On Wed, Nov 6, 2019 at 8:47 AM Shen Kai <shenkai8@huawei.com> wrote:
>
> From: shenkai <shenkai8@huawei.com>

Can you please use the proper spelling of your name here?

>
> Add NULL check in the store function here to avoid NULL callback invoking.
> Though some interfaces of cpufreq are set as read-only, user can still get
> write permission using chmod which can lead to a kernel crash.
>
> The following operations can lead to a kernel crash.
>
> chmod +w /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
> echo 1 >  /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
>
> This bug was found on linux 4.19
>
> Signed-off-by: shenkai <shenkai8@huawei.com>

And here?

> Reported-by: linfeilong <linfeilong@huawei.com>
> Reviewed-by: linfeilong <linfeilong@huawei.com>

And the proper spelling of the reporter/reviewer name here too?

> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  drivers/cpufreq/cpufreq.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index bffc11b..4ccaa96 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -947,6 +947,9 @@ static ssize_t store(struct kobject *kobj, struct attribute *attr,
>         struct freq_attr *fattr = to_attr(attr);
>         ssize_t ret = -EINVAL;
>
> +       if (!fattr->store)
> +               return ret;
> +
>         /*
>          * cpus_read_trylock() is used here to work around a circular lock
>          * dependency problem with respect to the cpufreq_register_driver().
> --
> 2.6.4.windows.1
>
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH]cpufreq: add NULL check to the store method of cpufreq
  2019-11-06 12:32 ` Rafael J. Wysocki
@ 2019-11-07  1:53   ` Shen Kai
  2019-11-07  2:32     ` Viresh Kumar
  0 siblings, 1 reply; 10+ messages in thread
From: Shen Kai @ 2019-11-07  1:53 UTC (permalink / raw)
  To: viresh.kumar, rjw; +Cc: rafael, hushiyuan, linfeilong, linux-pm

From: Kai Shen <shenkai8@huawei.com>

Add NULL check in the store function here to avoid NULL callback invoking.
Though some interfaces of cpufreq are set as read-only, user can still get 
write permission using chmod which can lead to a kernel crash.

The following operations can lead to a kernel crash.

chmod +w /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
echo 1 >  /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq

This bug was found on linux 4.19

Signed-off-by: Kai Shen <shenkai8@huawei.com>
Reported-by: Feilong Lin <linfeilong@huawei.com>
Reviewed-by: Feilong Lin <linfeilong@huawei.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/cpufreq.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index bffc11b..4ccaa96 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -947,6 +947,9 @@ static ssize_t store(struct kobject *kobj, struct attribute *attr,
 	struct freq_attr *fattr = to_attr(attr);
 	ssize_t ret = -EINVAL;
 
+	if (!fattr->store)
+		return ret;
+
 	/*
 	 * cpus_read_trylock() is used here to work around a circular lock
 	 * dependency problem with respect to the cpufreq_register_driver().
-- 
2.6.4.windows.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH]cpufreq: add NULL check to the store method of cpufreq
  2019-11-07  1:53   ` Shen Kai
@ 2019-11-07  2:32     ` Viresh Kumar
  2019-11-07  2:34       ` Viresh Kumar
  0 siblings, 1 reply; 10+ messages in thread
From: Viresh Kumar @ 2019-11-07  2:32 UTC (permalink / raw)
  To: Shen Kai; +Cc: rjw, rafael, hushiyuan, linfeilong, linux-pm

On 07-11-19, 01:53, Shen Kai wrote:
> From: Kai Shen <shenkai8@huawei.com>
> 
> Add NULL check in the store function here to avoid NULL callback invoking.
> Though some interfaces of cpufreq are set as read-only, user can still get 
> write permission using chmod which can lead to a kernel crash.
> 
> The following operations can lead to a kernel crash.
> 
> chmod +w /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
> echo 1 >  /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
> 
> This bug was found on linux 4.19
> 
> Signed-off-by: Kai Shen <shenkai8@huawei.com>
> Reported-by: Feilong Lin <linfeilong@huawei.com>
> Reviewed-by: Feilong Lin <linfeilong@huawei.com>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  drivers/cpufreq/cpufreq.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index bffc11b..4ccaa96 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -947,6 +947,9 @@ static ssize_t store(struct kobject *kobj, struct attribute *attr,
>  	struct freq_attr *fattr = to_attr(attr);
>  	ssize_t ret = -EINVAL;
>  
> +	if (!fattr->store)
> +		return ret;

The return error shouldn't be -EINVAL here, maybe ENOPERM or ENOENT ?

> +
>  	/*
>  	 * cpus_read_trylock() is used here to work around a circular lock
>  	 * dependency problem with respect to the cpufreq_register_driver().
> -- 
> 2.6.4.windows.1
> 

-- 
viresh

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH]cpufreq: add NULL check to the store method of cpufreq
  2019-11-07  2:32     ` Viresh Kumar
@ 2019-11-07  2:34       ` Viresh Kumar
  2019-11-07  2:53         ` Shen Kai
  0 siblings, 1 reply; 10+ messages in thread
From: Viresh Kumar @ 2019-11-07  2:34 UTC (permalink / raw)
  To: Shen Kai; +Cc: rjw, rafael, hushiyuan, linfeilong, linux-pm

On 07-11-19, 08:02, Viresh Kumar wrote:
> On 07-11-19, 01:53, Shen Kai wrote:
> > From: Kai Shen <shenkai8@huawei.com>
> > 
> > Add NULL check in the store function here to avoid NULL callback invoking.
> > Though some interfaces of cpufreq are set as read-only, user can still get 
> > write permission using chmod which can lead to a kernel crash.
> > 
> > The following operations can lead to a kernel crash.
> > 
> > chmod +w /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
> > echo 1 >  /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
> > 
> > This bug was found on linux 4.19
> > 
> > Signed-off-by: Kai Shen <shenkai8@huawei.com>
> > Reported-by: Feilong Lin <linfeilong@huawei.com>
> > Reviewed-by: Feilong Lin <linfeilong@huawei.com>
> > Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
> > ---
> >  drivers/cpufreq/cpufreq.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> > index bffc11b..4ccaa96 100644
> > --- a/drivers/cpufreq/cpufreq.c
> > +++ b/drivers/cpufreq/cpufreq.c
> > @@ -947,6 +947,9 @@ static ssize_t store(struct kobject *kobj, struct attribute *attr,
> >  	struct freq_attr *fattr = to_attr(attr);
> >  	ssize_t ret = -EINVAL;
> >  
> > +	if (!fattr->store)
> > +		return ret;
> 
> The return error shouldn't be -EINVAL here, maybe ENOPERM or ENOENT ?

s/ENOPERM/EPERM/

-- 
viresh

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH]cpufreq: add NULL check to the store method of cpufreq
  2019-11-07  2:34       ` Viresh Kumar
@ 2019-11-07  2:53         ` Shen Kai
  2019-11-07  3:06           ` Viresh Kumar
  0 siblings, 1 reply; 10+ messages in thread
From: Shen Kai @ 2019-11-07  2:53 UTC (permalink / raw)
  To: viresh.kumar, rjw; +Cc: rafael, hushiyuan, linfeilong, linux-pm

From: Kai Shen <shenkai8@huawei.com>

Add NULL check in the store function here to avoid NULL callback invoking.
Though some interfaces of cpufreq are set as read-only, user can still get 
write permission using chmod which can lead to a kernel crash.

The following operations can lead to a kernel crash.

chmod +w /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
echo 1 >  /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq

This bug was found on linux 4.19

Signed-off-by: Kai Shen <shenkai8@huawei.com>
Reported-by: Feilong Lin <linfeilong@huawei.com>
Reviewed-by: Feilong Lin <linfeilong@huawei.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/cpufreq.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index bffc11b..4ccaa96 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -947,6 +947,9 @@ static ssize_t store(struct kobject *kobj, struct attribute *attr,
 	struct freq_attr *fattr = to_attr(attr);
 	ssize_t ret = -EINVAL;
 
+	if (!fattr->store)
+		return -EPERM;
+
 	/*
 	 * cpus_read_trylock() is used here to work around a circular lock
 	 * dependency problem with respect to the cpufreq_register_driver().
-- 
2.6.4.windows.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH]cpufreq: add NULL check to the store method of cpufreq
  2019-11-07  2:53         ` Shen Kai
@ 2019-11-07  3:06           ` Viresh Kumar
  2019-11-07  5:08             ` [PATCH v3]cpufreq: " Shen Kai
  0 siblings, 1 reply; 10+ messages in thread
From: Viresh Kumar @ 2019-11-07  3:06 UTC (permalink / raw)
  To: Shen Kai; +Cc: rjw, rafael, hushiyuan, linfeilong, linux-pm

On 07-11-19, 02:53, Shen Kai wrote:
> From: Kai Shen <shenkai8@huawei.com>
> 
> Add NULL check in the store function here to avoid NULL callback invoking.
> Though some interfaces of cpufreq are set as read-only, user can still get 
> write permission using chmod which can lead to a kernel crash.
> 
> The following operations can lead to a kernel crash.
> 
> chmod +w /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
> echo 1 >  /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
> 
> This bug was found on linux 4.19
> 
> Signed-off-by: Kai Shen <shenkai8@huawei.com>
> Reported-by: Feilong Lin <linfeilong@huawei.com>
> Reviewed-by: Feilong Lin <linfeilong@huawei.com>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  drivers/cpufreq/cpufreq.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index bffc11b..4ccaa96 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -947,6 +947,9 @@ static ssize_t store(struct kobject *kobj, struct attribute *attr,
>  	struct freq_attr *fattr = to_attr(attr);
>  	ssize_t ret = -EINVAL;
>  
> +	if (!fattr->store)
> +		return -EPERM;
> +

And this should be -EIO, I found that after looking at all the
instances of struct kobj_type in the kernel :(

Also there is another change you need to make.

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index dd1628192310..4bfaafde9083 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -933,6 +933,9 @@ static ssize_t show(struct kobject *kobj, struct attribute *attr, char *buf)
        struct freq_attr *fattr = to_attr(attr);
        ssize_t ret;
 
+       if (!fattr->show)
+               return -EIO;
+
        down_read(&policy->rwsem);
        ret = fattr->show(policy, buf);
        up_read(&policy->rwsem);

as there is a write-only attribute (reset) in cpufreq stats.

-- 
viresh

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v3]cpufreq: add NULL check to the store method of cpufreq
  2019-11-07  3:06           ` Viresh Kumar
@ 2019-11-07  5:08             ` Shen Kai
  2019-11-07  5:48               ` Viresh Kumar
  2019-11-08 11:11               ` Rafael J. Wysocki
  0 siblings, 2 replies; 10+ messages in thread
From: Shen Kai @ 2019-11-07  5:08 UTC (permalink / raw)
  To: viresh.kumar; +Cc: hushiyuan, linfeilong, rafael.j.wysocki, linux-pm, rjw

From: Kai Shen <shenkai8@huawei.com>

Add NULL check in the store function here to avoid NULL callback invoking.
Though some interfaces of cpufreq are set as read-only, user can still get 
write permission using chmod which can lead to a kernel crash.

The following operations can lead to a kernel crash.

chmod +w /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
echo 1 >  /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq

This bug was found on linux 4.19

Signed-off-by: Kai Shen <shenkai8@huawei.com>
Reported-by: Feilong Lin <linfeilong@huawei.com>
Reviewed-by: Feilong Lin <linfeilong@huawei.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
V2->V3
- use return value -EIO instead.
- do NULL check in show method too.

 drivers/cpufreq/cpufreq.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 48a224a..bc19d6c 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -933,6 +933,9 @@ static ssize_t show(struct kobject *kobj, struct attribute *attr, char *buf)
 	struct freq_attr *fattr = to_attr(attr);
 	ssize_t ret;
 
+	if (!fattr->show)
+		return -EIO;
+
 	down_read(&policy->rwsem);
 	ret = fattr->show(policy, buf);
 	up_read(&policy->rwsem);
@@ -947,6 +950,9 @@ static ssize_t store(struct kobject *kobj, struct attribute *attr,
 	struct freq_attr *fattr = to_attr(attr);
 	ssize_t ret = -EINVAL;
 
+	if (!fattr->store)
+		return -EIO;
+
 	/*
 	 * cpus_read_trylock() is used here to work around a circular lock
 	 * dependency problem with respect to the cpufreq_register_driver().
-- 
2.6.4.windows.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v3]cpufreq: add NULL check to the store method of cpufreq
  2019-11-07  5:08             ` [PATCH v3]cpufreq: " Shen Kai
@ 2019-11-07  5:48               ` Viresh Kumar
  2019-11-08 11:11               ` Rafael J. Wysocki
  1 sibling, 0 replies; 10+ messages in thread
From: Viresh Kumar @ 2019-11-07  5:48 UTC (permalink / raw)
  To: Shen Kai; +Cc: hushiyuan, linfeilong, rafael.j.wysocki, linux-pm, rjw

On 07-11-19, 05:08, Shen Kai wrote:
> From: Kai Shen <shenkai8@huawei.com>
> 
> Add NULL check in the store function here to avoid NULL callback invoking.
> Though some interfaces of cpufreq are set as read-only, user can still get 
> write permission using chmod which can lead to a kernel crash.
> 
> The following operations can lead to a kernel crash.
> 
> chmod +w /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
> echo 1 >  /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
> 
> This bug was found on linux 4.19
> 
> Signed-off-by: Kai Shen <shenkai8@huawei.com>
> Reported-by: Feilong Lin <linfeilong@huawei.com>
> Reviewed-by: Feilong Lin <linfeilong@huawei.com>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> V2->V3
> - use return value -EIO instead.
> - do NULL check in show method too.
> 
>  drivers/cpufreq/cpufreq.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index 48a224a..bc19d6c 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -933,6 +933,9 @@ static ssize_t show(struct kobject *kobj, struct attribute *attr, char *buf)
>  	struct freq_attr *fattr = to_attr(attr);
>  	ssize_t ret;
>  
> +	if (!fattr->show)
> +		return -EIO;
> +
>  	down_read(&policy->rwsem);
>  	ret = fattr->show(policy, buf);
>  	up_read(&policy->rwsem);
> @@ -947,6 +950,9 @@ static ssize_t store(struct kobject *kobj, struct attribute *attr,
>  	struct freq_attr *fattr = to_attr(attr);
>  	ssize_t ret = -EINVAL;
>  
> +	if (!fattr->store)
> +		return -EIO;
> +
>  	/*
>  	 * cpus_read_trylock() is used here to work around a circular lock
>  	 * dependency problem with respect to the cpufreq_register_driver().

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3]cpufreq: add NULL check to the store method of cpufreq
  2019-11-07  5:08             ` [PATCH v3]cpufreq: " Shen Kai
  2019-11-07  5:48               ` Viresh Kumar
@ 2019-11-08 11:11               ` Rafael J. Wysocki
  1 sibling, 0 replies; 10+ messages in thread
From: Rafael J. Wysocki @ 2019-11-08 11:11 UTC (permalink / raw)
  To: Shen Kai; +Cc: viresh.kumar, hushiyuan, linfeilong, rafael.j.wysocki, linux-pm

On Thursday, November 7, 2019 6:08:17 AM CET Shen Kai wrote:
> From: Kai Shen <shenkai8@huawei.com>
> 
> Add NULL check in the store function here to avoid NULL callback invoking.
> Though some interfaces of cpufreq are set as read-only, user can still get 
> write permission using chmod which can lead to a kernel crash.
> 
> The following operations can lead to a kernel crash.
> 
> chmod +w /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
> echo 1 >  /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
> 
> This bug was found on linux 4.19
> 
> Signed-off-by: Kai Shen <shenkai8@huawei.com>
> Reported-by: Feilong Lin <linfeilong@huawei.com>
> Reviewed-by: Feilong Lin <linfeilong@huawei.com>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> V2->V3
> - use return value -EIO instead.
> - do NULL check in show method too.
> 
>  drivers/cpufreq/cpufreq.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index 48a224a..bc19d6c 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -933,6 +933,9 @@ static ssize_t show(struct kobject *kobj, struct attribute *attr, char *buf)
>  	struct freq_attr *fattr = to_attr(attr);
>  	ssize_t ret;
>  
> +	if (!fattr->show)
> +		return -EIO;
> +
>  	down_read(&policy->rwsem);
>  	ret = fattr->show(policy, buf);
>  	up_read(&policy->rwsem);
> @@ -947,6 +950,9 @@ static ssize_t store(struct kobject *kobj, struct attribute *attr,
>  	struct freq_attr *fattr = to_attr(attr);
>  	ssize_t ret = -EINVAL;
>  
> +	if (!fattr->store)
> +		return -EIO;
> +
>  	/*
>  	 * cpus_read_trylock() is used here to work around a circular lock
>  	 * dependency problem with respect to the cpufreq_register_driver().
> 

Applying as 5.5 material with updated subject and changelog (the original ones
did not mention the show() function).

Thanks!




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-11-08 11:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06  7:46 [PATCH]cpufreq: add NULL check to the store method of cpufreq Shen Kai
2019-11-06 12:32 ` Rafael J. Wysocki
2019-11-07  1:53   ` Shen Kai
2019-11-07  2:32     ` Viresh Kumar
2019-11-07  2:34       ` Viresh Kumar
2019-11-07  2:53         ` Shen Kai
2019-11-07  3:06           ` Viresh Kumar
2019-11-07  5:08             ` [PATCH v3]cpufreq: " Shen Kai
2019-11-07  5:48               ` Viresh Kumar
2019-11-08 11:11               ` Rafael J. Wysocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.