sysfs:Addresses documentation in sysfs_merge_group and sysfs_unmerge_group.
authorRohan Kollambalath <rkollamb@digi.com>
Sun, 11 Feb 2024 22:36:34 +0000 (08:36 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Mar 2024 22:04:50 +0000 (22:04 +0000)
commita54c1d1b859a57a99d5cbdce37ac754cbdd9344a
tree3cd19b831894774317777adcff06c2c97fa206db
parent8dde8fa0cc3edce73c050b9882d06c1a575f6402
sysfs:Addresses documentation in sysfs_merge_group and sysfs_unmerge_group.

These functions take a struct attribute_group as an input which has an
optional .name field. These functions rely on the .name field being
populated and do not check if its null. They pass this name into other
functions, eventually leading to a null pointer dereference.

This change simply updates the documentation of the function to make
this requirement clear.

Signed-off-by: Rohan Kollambalath <rkollamb@digi.com>
Link: https://lore.kernel.org/r/20240211223634.2103665-1-rohankollambalath@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/sysfs/group.c