[PATCH 1/2] power/intel_uncore: fix crash closing uninitialized driver
Kevin Laatz
kevin.laatz at intel.com
Wed May 21 15:06:21 CEST 2025
On 15/05/2025 17:58, Bruce Richardson wrote:
> When the power_intel_uncore_autotest unit test is run as an unprivileged
> user which cannot init the power library, it crashes the unit test
> binary due to calling "rte_power_uncore_exit" after the first test case
> (initialization) fails. This crash is due to trying to write to NULL
> file handles.
>
> Fix the crash by checking each file handle is non-null before writing to
> it and closing it.
>
> Fixes: 60b8a661a957 ("power: add Intel uncore frequency control")
> Cc:stable at dpdk.org
>
> Signed-off-by: Bruce Richardson<bruce.richardson at intel.com>
> ---
> drivers/power/intel_uncore/intel_uncore.c | 35 ++++++++++++-----------
> 1 file changed, 18 insertions(+), 17 deletions(-)
>
Acked-by: Kevin Laatz <kevin.laatz at intel.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20250521/cf59f0f8/attachment-0001.htm>
More information about the dev
mailing list