-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
None
-
None
-
3
-
9223372036854775807
class_set_global() incorrectly accepts parameters whose name is empty, such as "=value". For an input beginning with =, the calculated off is 0.
size_t off = value - param - 1;
The subsequent comparison:
strncmp(lustre_attrs[i]->name, param, off)
becomes strncmp(..., ..., 0), which always returns 0. As a result, the first attribute in lustre_attrs[] is incorrectly selected and its store callback is invoked with the supplied value. An empty parameter name should not match any attribute.
Expected behavior
- Reject parameters with an empty name, e.g. "=value".
- Return an appropriate error such as -EINVAL.
- Only match an attribute when a non-empty parameter name is provided and it matches the attribute name.
- is related to
-
LU-9431 class_process_proc_param can't handle sysfs
-
- Resolved
-