Re: [PATCH] acpi-cpufreq: De-register cpu notifier and free struct msr on error.

2014-02-02 Thread Viresh Kumar
On 28 January 2014 09:28, Konrad Rzeszutek Wilk  wrote:
> If cpufreq_register_driver() fails we would free the acpi driver
> related structures but not free the ones allocated
> by acpi_cpufreq_boost_init() function. This meant that as
> the driver error-ed out and a CPU online/offline event came
> we would crash and burn as one of the CPU notifiers would point
> to garbage.
>
> This fixes a regression that commit cfc9c8ed03e4d908f2388af8815f44c87b503aaf
> "acpi-cpufreq: Adjust the code to use the common boost attribute"
> introduced.
>
> CC: Lukasz Majewski 
> CC: Myungjoo Ham 
> CC: Viresh Kumar 
> CC: Rafael J. Wysocki 
> CC: Boris Ostrovsky 
> Signed-off-by: Konrad Rzeszutek Wilk 
> ---
>  drivers/cpufreq/acpi-cpufreq.c |5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)

Acked-by: Viresh Kumar 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] acpi-cpufreq: De-register cpu notifier and free struct msr on error.

2014-02-02 Thread Viresh Kumar
On 28 January 2014 09:28, Konrad Rzeszutek Wilk kon...@kernel.org wrote:
 If cpufreq_register_driver() fails we would free the acpi driver
 related structures but not free the ones allocated
 by acpi_cpufreq_boost_init() function. This meant that as
 the driver error-ed out and a CPU online/offline event came
 we would crash and burn as one of the CPU notifiers would point
 to garbage.

 This fixes a regression that commit cfc9c8ed03e4d908f2388af8815f44c87b503aaf
 acpi-cpufreq: Adjust the code to use the common boost attribute
 introduced.

 CC: Lukasz Majewski l.majew...@samsung.com
 CC: Myungjoo Ham myungjoo@samsung.com
 CC: Viresh Kumar viresh.ku...@linaro.org
 CC: Rafael J. Wysocki rafael.j.wyso...@intel.com
 CC: Boris Ostrovsky boris.ostrov...@oracle.com
 Signed-off-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com
 ---
  drivers/cpufreq/acpi-cpufreq.c |5 +++--
  1 files changed, 3 insertions(+), 2 deletions(-)

Acked-by: Viresh Kumar viresh.ku...@linaro.org
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] acpi-cpufreq: De-register cpu notifier and free struct msr on error.

2014-01-28 Thread Lukasz Majewski
Hi Konrad,

> If cpufreq_register_driver() fails we would free the acpi driver
> related structures but not free the ones allocated
> by acpi_cpufreq_boost_init() function. This meant that as
> the driver error-ed out and a CPU online/offline event came
> we would crash and burn as one of the CPU notifiers would point
> to garbage.
> 

Thanks for spotting this bug. My bad.

> This fixes a regression that commit
> cfc9c8ed03e4d908f2388af8815f44c87b503aaf "acpi-cpufreq: Adjust the
> code to use the common boost attribute" introduced.
> 
> CC: Lukasz Majewski 
> CC: Myungjoo Ham 
> CC: Viresh Kumar 
> CC: Rafael J. Wysocki 
> CC: Boris Ostrovsky 
> Signed-off-by: Konrad Rzeszutek Wilk 
> ---
>  drivers/cpufreq/acpi-cpufreq.c |5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/cpufreq/acpi-cpufreq.c
> b/drivers/cpufreq/acpi-cpufreq.c index 79e5608..3e856d6 100644
> --- a/drivers/cpufreq/acpi-cpufreq.c
> +++ b/drivers/cpufreq/acpi-cpufreq.c
> @@ -969,9 +969,10 @@ static int __init acpi_cpufreq_init(void)
>   acpi_cpufreq_boost_init();
>  
>   ret = cpufreq_register_driver(_cpufreq_driver);
> - if (ret)
> + if (ret) {
>   free_acpi_perf_data();
> -
> + acpi_cpufreq_boost_exit();
> + }
>   return ret;
>  }
>  

Acked-by: Lukasz Majewski 

-- 
Best regards,

Lukasz Majewski

Samsung R Institute Poland (SRPOL) | Linux Platform Group
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] acpi-cpufreq: De-register cpu notifier and free struct msr on error.

2014-01-28 Thread Lukasz Majewski
Hi Konrad,

 If cpufreq_register_driver() fails we would free the acpi driver
 related structures but not free the ones allocated
 by acpi_cpufreq_boost_init() function. This meant that as
 the driver error-ed out and a CPU online/offline event came
 we would crash and burn as one of the CPU notifiers would point
 to garbage.
 

Thanks for spotting this bug. My bad.

 This fixes a regression that commit
 cfc9c8ed03e4d908f2388af8815f44c87b503aaf acpi-cpufreq: Adjust the
 code to use the common boost attribute introduced.
 
 CC: Lukasz Majewski l.majew...@samsung.com
 CC: Myungjoo Ham myungjoo@samsung.com
 CC: Viresh Kumar viresh.ku...@linaro.org
 CC: Rafael J. Wysocki rafael.j.wyso...@intel.com
 CC: Boris Ostrovsky boris.ostrov...@oracle.com
 Signed-off-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com
 ---
  drivers/cpufreq/acpi-cpufreq.c |5 +++--
  1 files changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/cpufreq/acpi-cpufreq.c
 b/drivers/cpufreq/acpi-cpufreq.c index 79e5608..3e856d6 100644
 --- a/drivers/cpufreq/acpi-cpufreq.c
 +++ b/drivers/cpufreq/acpi-cpufreq.c
 @@ -969,9 +969,10 @@ static int __init acpi_cpufreq_init(void)
   acpi_cpufreq_boost_init();
  
   ret = cpufreq_register_driver(acpi_cpufreq_driver);
 - if (ret)
 + if (ret) {
   free_acpi_perf_data();
 -
 + acpi_cpufreq_boost_exit();
 + }
   return ret;
  }
  

Acked-by: Lukasz Majewski l.majew...@samsung.com

-- 
Best regards,

Lukasz Majewski

Samsung RD Institute Poland (SRPOL) | Linux Platform Group
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] acpi-cpufreq: De-register cpu notifier and free struct msr on error.

2014-01-27 Thread Konrad Rzeszutek Wilk
If cpufreq_register_driver() fails we would free the acpi driver
related structures but not free the ones allocated
by acpi_cpufreq_boost_init() function. This meant that as
the driver error-ed out and a CPU online/offline event came
we would crash and burn as one of the CPU notifiers would point
to garbage.

This fixes a regression that commit cfc9c8ed03e4d908f2388af8815f44c87b503aaf
"acpi-cpufreq: Adjust the code to use the common boost attribute"
introduced.

CC: Lukasz Majewski 
CC: Myungjoo Ham 
CC: Viresh Kumar 
CC: Rafael J. Wysocki 
CC: Boris Ostrovsky 
Signed-off-by: Konrad Rzeszutek Wilk 
---
 drivers/cpufreq/acpi-cpufreq.c |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
index 79e5608..3e856d6 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -969,9 +969,10 @@ static int __init acpi_cpufreq_init(void)
acpi_cpufreq_boost_init();
 
ret = cpufreq_register_driver(_cpufreq_driver);
-   if (ret)
+   if (ret) {
free_acpi_perf_data();
-
+   acpi_cpufreq_boost_exit();
+   }
return ret;
 }
 
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] acpi-cpufreq: De-register cpu notifier and free struct msr on error.

2014-01-27 Thread Konrad Rzeszutek Wilk
If cpufreq_register_driver() fails we would free the acpi driver
related structures but not free the ones allocated
by acpi_cpufreq_boost_init() function. This meant that as
the driver error-ed out and a CPU online/offline event came
we would crash and burn as one of the CPU notifiers would point
to garbage.

This fixes a regression that commit cfc9c8ed03e4d908f2388af8815f44c87b503aaf
acpi-cpufreq: Adjust the code to use the common boost attribute
introduced.

CC: Lukasz Majewski l.majew...@samsung.com
CC: Myungjoo Ham myungjoo@samsung.com
CC: Viresh Kumar viresh.ku...@linaro.org
CC: Rafael J. Wysocki rafael.j.wyso...@intel.com
CC: Boris Ostrovsky boris.ostrov...@oracle.com
Signed-off-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com
---
 drivers/cpufreq/acpi-cpufreq.c |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
index 79e5608..3e856d6 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -969,9 +969,10 @@ static int __init acpi_cpufreq_init(void)
acpi_cpufreq_boost_init();
 
ret = cpufreq_register_driver(acpi_cpufreq_driver);
-   if (ret)
+   if (ret) {
free_acpi_perf_data();
-
+   acpi_cpufreq_boost_exit();
+   }
return ret;
 }
 
-- 
1.7.7.6

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/