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: <7c21e0cc-d266-87db-b92d-663561924537@gmail.com>
Date:   Fri, 5 Mar 2021 16:50:12 +0300
From:   Dmitry Osipenko <digetx@...il.com>
To:     Sowjanya Komatineni <skomatineni@...dia.com>,
        thierry.reding@...il.com, jonathanh@...dia.com,
        daniel.lezcano@...aro.org, robh+dt@...nel.org
Cc:     ksitaraman@...dia.com, sanjayc@...dia.com,
        linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-pm@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH v1 4/5] cpuidle: Add Tegra194 cpuidle driver

04.03.2021 09:08, Sowjanya Komatineni пишет:
...
> +static int __init tegra194_cpuidle_probe(struct platform_device *pdev)
> +{
> +	struct cpumask *cpumask;
> +	int cpu, ret;
> +
> +	if (!check_mce_version()) {
> +		pr_err("cpuidle: incompatible MCE version, cannot register driver\n");

Should be dev_err() everywhere.

> +		return -ENODEV;
> +	}
> +
> +	tsc_per_usec = arch_timer_get_cntfrq() / 1000000;
> +
> +	cpumask = devm_kzalloc(&pdev->dev, cpumask_size(), GFP_KERNEL);
> +	for_each_online_cpu(cpu)
> +		cpumask_set_cpu(cpu, cpumask);

cpumask_copy(..)?

> +	t194_cpu_idle_driver.cpumask = cpumask;

Depending on 'online' mask instead of the 'present' mask looks odd. Is
this really intended to be so?

...
> +static int tegra194_cpuidle_remove(struct platform_device *pdev)
> +{
> +	unregister_pm_notifier(&suspend_notifier);
> +	cpuhp_remove_state(hp_state);
> +	cpuidle_unregister(&t194_cpu_idle_driver);
> +	kfree(t194_cpu_idle_driver.cpumask);

kfree() of a managed resource.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ