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: <CAC5m3Bwq5cGkN+kk+vWFdj6qjGJUCS3BduwhHMyVAQ6Mdbmh2A@mail.gmail.com>
Date:	Tue, 15 Jul 2014 08:32:57 +0530
From:	Tushar Behera <tushar.b@...sung.com>
To:	Sylwester Nawrocki <s.nawrocki@...sung.com>
Cc:	ML Arch-Arm <linux-arm-kernel@...ts.infradead.org>,
	lkml <linux-kernel@...r.kernel.org>,
	linux-samsung-soc <linux-samsung-soc@...r.kernel.org>,
	Kukjin Kim <kgene.kim@...sung.com>,
	Mike Turquette <mturquette@...aro.org>,
	Tomasz Figa <t.figa@...sung.com>
Subject: Re: [PATCH V2 3/3] clk: exynos-audss: Use samsung clock APIs to
 register/unregister clocks

On Mon, Jul 14, 2014 at 9:04 PM, Sylwester Nawrocki
<s.nawrocki@...sung.com> wrote:
> On 11/07/14 14:00, Tushar Behera wrote:
>> @@ -103,17 +140,11 @@ static int exynos_audss_clk_probe(struct platform_device *pdev)
>>               return PTR_ERR(reg_base);
>>       }
>>
>> -     clk_table = devm_kzalloc(&pdev->dev,
>> -                             sizeof(struct clk *) * EXYNOS_AUDSS_MAX_CLKS,
>> -                             GFP_KERNEL);
>> -     if (!clk_table)
>> +     ctx = samsung_clk_init(pdev->dev.of_node, reg_base, nr_clks);
>
> There is an issue here that this registers the clk provider before all
> its clocks are registered with the clk core. Therefore it introduces
> a race condition.
>
> Please have a look at patch [1], you may want to rebase this series
> onto that patch.
>

Thanks for the pointer. I will re-post.

>> +     samsung_clk_register_div(ctx, exynos_audss_div_clks,
>> +                             ARRAY_SIZE(exynos_audss_div_clks));
> [...]
>> +     samsung_clk_register_gate(ctx, exynos_audss_gate_clks,
>> +                             ARRAY_SIZE(exynos_audss_gate_clks));
> [...]
>> -     ret = of_clk_add_provider(pdev->dev.of_node, of_clk_src_onecell_get,
>> -                                     &clk_data);
>> -     if (ret) {
>> -             dev_err(&pdev->dev, "failed to add clock provider\n");
>> -             goto unregister;
>> +             samsung_clk_register_gate(ctx, exynos5420_audss_gate_clks,
>> +                                     ARRAY_SIZE(exynos5420_audss_gate_clks));
>>       }
>
> [1]
> https://git.kernel.org/cgit/linux/kernel/git/tfiga/samsung-clk.git/commit/?h=samsung-clk-next&id=d5e136a21b2028fb1f45143ea7112d5869bfc6c7
>
> --
> Regards,
> Sylwester
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ