lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7baafe73-7bed-fb1c-cd9b-f9bff2c1ea76@linaro.org>
Date:   Wed, 11 Oct 2017 11:48:52 +0200
From:   Daniel Lezcano <daniel.lezcano@...aro.org>
To:     "Rafael J. Wysocki" <rafael@...nel.org>,
        Leo Yan <leo.yan@...aro.org>
Cc:     "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Linux PM <linux-pm@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/2] ARM: cpuidle: Correct driver unregistration if
 init fails

On 11/10/2017 00:00, Rafael J. Wysocki wrote:
> On Tue, Oct 10, 2017 at 7:47 AM, Leo Yan <leo.yan@...aro.org> wrote:
>> If cpuidle init fails, the code misses to unregister the driver for
>> current CPU. Furthermore, we also need to rollback to cancel all
>> previous CPUs registration; but the code retrieves driver handler by
>> using function cpuidle_get_driver(), this function returns back
>> current CPU driver handler but not previous CPU's handler, which leads
>> to the failure handling code cannot unregister previous CPUs driver.
>>
>> This commit fixes two mentioned issues, it adds error handling path
>> 'goto out_unregister_drv' for current CPU driver unregistration; and
>> it is to replace cpuidle_get_driver() with cpuidle_get_cpu_driver(),
>> the later function can retrieve driver handler for previous CPUs
>> according to the CPU device handler so can unregister the driver
>> properly.
>>
>> This patch also adds extra error handling paths 'goto out_kfree_dev'
>> and 'goto out_kfree_drv' and adjusts the freeing sentences for previous
>> CPUs; so make the code more readable for freeing 'dev' and 'drv'
>> structures.
>>
>> Suggested-by: Daniel Lezcano <daniel.lezcano@...aro.org>
>> Signed-off-by: Leo Yan <leo.yan@...aro.org>
>> Fixes: d50a7d8acd78 ("ARM: cpuidle: Support asymmetric idle definition")
> 
> Daniel, any comments here and on the [2/2]?

Hi Rafael,

I'm ok with both.

Acked-by: Daniel Lezcano <daniel.lezcano@...aro.org>



-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ