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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 26 Feb 2019 13:08:59 +0100
From:   Bartosz Golaszewski <brgl@...ev.pl>
To:     David Lechner <david@...hnology.com>
Cc:     Sekhar Nori <nsekhar@...com>, Kevin Hilman <khilman@...nel.org>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Thomas Gleixner <tglx@...utronix.de>,
        devicetree <devicetree@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>
Subject: Re: [PATCH v2 04/12] ARM: davinci: WARN_ON() if clk_get() fails

wt., 5 lut 2019 o 03:18 David Lechner <david@...hnology.com> napisaƂ(a):
>
> On 2/4/19 11:17 AM, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bgolaszewski@...libre.com>
> >
> > Currently the timer code checks if the clock pointer passed to it is
> > good (!IS_ERR(clk)). The new clocksource driver expects the clock to
> > be functional and doesn't perform any checks so emit a warning if
> > clk_get() fails. Apply this to all davinci platforms.
> >
> > Signed-off-by: Bartosz Golaszewski <bgolaszewski@...libre.com>
> > ---
> >   arch/arm/mach-davinci/da830.c  | 4 ++++
> >   arch/arm/mach-davinci/da850.c  | 4 ++++
> >   arch/arm/mach-davinci/dm355.c  | 4 ++++
> >   arch/arm/mach-davinci/dm365.c  | 4 ++++
> >   arch/arm/mach-davinci/dm644x.c | 4 ++++
> >   arch/arm/mach-davinci/dm646x.c | 4 ++++
> >   6 files changed, 24 insertions(+)
> >
> > diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c
> > index 2cc9fe4c3a91..9a4b749cbb6b 100644
> > --- a/arch/arm/mach-davinci/da830.c
> > +++ b/arch/arm/mach-davinci/da830.c
> > @@ -834,6 +834,10 @@ void __init da830_init_time(void)
> >       da830_pll_init(NULL, pll, NULL);
> >
> >       clk = clk_get(NULL, "timer0");
> > +     if (WARN_ON(IS_ERR(clk))) {
> > +             pr_err("Unable to get the timer clock\n");
>
> Do we really need a warning _and_ an error?
>

That will give us the reason AND point us to the right place in the code.

Bart

> > +             return;
> > +     }
> >
> >       davinci_timer_init(clk);
> >   }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ