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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 12 Sep 2016 11:16:59 +0930
From:   Joel Stanley <joel@....id.au>
To:     Daniel Lezcano <daniel.lezcano@...aro.org>
Cc:     Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] clocksource/drivers/moxart: Replace panic by pr_err

On Thu, Sep 8, 2016 at 11:28 PM, Daniel Lezcano
<daniel.lezcano@...aro.org> wrote:
> The clksrc-of code is supposed to catch the return code and fail gracefully.
>
> Don't panic on error, but print the error and exit with a relevant error
> code.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org>

Acked-by: Joel Stanley <joel@....id.au>

> ---
>  drivers/clocksource/moxart_timer.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/clocksource/moxart_timer.c b/drivers/clocksource/moxart_timer.c
> index cba25b7..2a8f470 100644
> --- a/drivers/clocksource/moxart_timer.c
> +++ b/drivers/clocksource/moxart_timer.c
> @@ -184,8 +184,10 @@ static int __init moxart_timer_init(struct device_node *node)
>         } else if (of_device_is_compatible(node, "aspeed,ast2400-timer")) {
>                 timer->t1_enable_val = ASPEED_TIMER1_ENABLE;
>                 timer->t1_disable_val = ASPEED_TIMER1_DISABLE;
> -       } else
> -               panic("%s: unknown platform\n", node->full_name);
> +       } else {
> +               pr_err("%s: unknown platform\n", node->full_name);
> +               return -EINVAL;
> +       }
>
>         timer->count_per_tick = DIV_ROUND_CLOSEST(pclk, HZ);
>
> --
> 1.9.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ