漏洞信息
# 补丁:工程管理:修复em_compute_costs()中的潜在除零错误
## 概述
在 Linux 内核中,解决了一个可能导致除零错误的问题。具体是在 `em_compute_costs()` 函数中,由于设备为非CPU类型时,`performance` 字段未被初始化,从而导致计算 `costs` 时可能发生的除零错误。
## 细节
当设备类型不是CPU时,`table[i].performance` 字段在之前的 `em_init_performance()` 中不会被初始化。这会导致在 `em_compute_costs()` 函数计算 costs 时出现除零错误。
为了解决这个问题,需要在代码中添加 `_is_cpu_device(dev)` 检查,确保只有CPU设备会被计算 cost。
## 影响
此问题仅会影响能源效率的计算(EAS),而不影响其他设备驱动程序的正常使用。目前没有其他驱动程序使用此 `cost` 算法。
提示
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
PM: EM: Fix potential division-by-zero error in em_compute_costs()
漏洞描述信息
In the Linux kernel, the following vulnerability has been resolved:
PM: EM: Fix potential division-by-zero error in em_compute_costs()
When the device is of a non-CPU type, table[i].performance won't be
initialized in the previous em_init_performance(), resulting in division
by zero when calculating costs in em_compute_costs().
Since the 'cost' algorithm is only used for EAS energy efficiency
calculations and is currently not utilized by other device drivers, we
should add the _is_cpu_device(dev) check to prevent this division-by-zero
issue.
CVSS信息
N/A
漏洞类别
N/A
漏洞标题
Linux kernel 安全漏洞
漏洞描述信息
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于非CPU设备计算成本时可能除零。
CVSS信息
N/A
漏洞类别
其他