-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
ledmon-1.1.0-2.el10
-
No
-
Moderate
-
ZStream
-
rhel-systemd
-
ssg_core_services
-
26
-
2
-
False
-
False
-
-
None
-
None
-
Approved Blocker
-
Pass
-
New Test Coverage
-
Unspecified
-
Unspecified
-
Unspecified
-
x86_64
-
None
What were you trying to do that didn't work?
Perform locate_off, the light should be turned off, but it turn on the light
What is the impact of this issue to you?
Please provide the package NVR for which the bug is seen:
How reproducible is this bug?:
Steps to reproduce
- install redhat10
- start ledmon service
- exe ledtl locate_off on nvme
Analyze results
On rehat10 verison, the ledmon and ledctl version is 1.1.0.
This version have bugs on locate_off command.
On the *_ibpi_state_get function,enum led_ibpi_pattern ibpi = string2ibpi(name) will feedback wrong ibpi para between locate and locate_off.
If the char *name is locate_off, the strncmp use the input name lenth to compare the string, it will first match the "locate" string, and "locate_off" will execute the "locate" logic. Need modify the "strncmp(input_name, name, strlen(input_name)) == 0" to "strcmp(input_name, name) == 0".
enum led_ibpi_pattern string2ibpi(const char *name)
{
int i;
for (i = 0; i < ARRAY_SIZE(ipbi_names); i++)
return LED_IBPI_PATTERN_UNKNOWN;
}
intel has fix this issue on ledmon mainline, but redhat has not fix this issue yet
utils: Fix string2ibpi functionstring2ibpi does not compare strings correctly, the function uses strncmp, which in case strings of different lengths, may return incorrect value if substrings of given max length are identical. In this function whole strings must be identical. Fix is to change strncmp to strcmp. Fixes #259 Fixes: 9481845 ("Add struct for mapping ibpi statuses to strings. (#211)") Signed-off-by: Blazej Kucman <blazej.kucman@intel.com>
Please help provide the fixed ledmon version.
- links to
-
RHBA-2025:150968 ledmon update