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]
Message-ID: <CAGETcx-y8j21tCude5oxU3NbEmb91f_m1dWJa0wUALkA40pwfA@mail.gmail.com>
Date:   Tue, 18 Feb 2020 18:20:03 -0800
From:   Saravana Kannan <saravanak@...gle.com>
To:     Daniel Lezcano <daniel.lezcano@...aro.org>,
        Thomas Gleixner <tglx@...utronix.de>
Cc:     Android Kernel Team <kernel-team@...roid.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1] clocksource: Avoid creating dead devices

On Fri, Jan 10, 2020 at 9:21 PM Saravana Kannan <saravanak@...gle.com> wrote:
>
> Timer initialization is done during early boot way before the driver
> core starts processing devices and drivers. Timers initialized during
> this early boot period don't really need or use a struct device.
>
> However, for timers represented as device tree nodes, the struct devices
> are still created and sit around unused and wasting memory. This change
> avoid this by marking the device tree nodes as "populated" if the
> corresponding timer is successfully initialized.
>
> Signed-off-by: Saravana Kannan <saravanak@...gle.com>
> ---
>  drivers/clocksource/timer-probe.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/clocksource/timer-probe.c b/drivers/clocksource/timer-probe.c
> index ee9574da53c0..a10f28d750a9 100644
> --- a/drivers/clocksource/timer-probe.c
> +++ b/drivers/clocksource/timer-probe.c
> @@ -27,8 +27,10 @@ void __init timer_probe(void)
>
>                 init_func_ret = match->data;
>
> +               of_node_set_flag(np, OF_POPULATED);
>                 ret = init_func_ret(np);
>                 if (ret) {
> +                       of_node_clear_flag(np, OF_POPULATED);
>                         if (ret != -EPROBE_DEFER)
>                                 pr_err("Failed to initialize '%pOF': %d\n", np,
>                                        ret);
> --
> 2.25.0.rc1.283.g88dfdc4193-goog

Gentle reminder.

-Saravana

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ