summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-04-21 10:30:21 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2024-04-21 10:30:21 -0700
commit4e90ba757b1bc4d6a787e85d0a079d1dbfa9608f (patch)
tree0b10f94fdb26eb743d4abed779e94c1aa3b2e2dc /fs
parentc0c6b5c090ead778b3a8132201d25040b1fdcbf8 (diff)
parent156539fd65019e8ed6b9fbac0583cf519cdbb227 (diff)
downloadlinux-stable-4e90ba757b1bc4d6a787e85d0a079d1dbfa9608f.tar.gz
linux-stable-4e90ba757b1bc4d6a787e85d0a079d1dbfa9608f.tar.bz2
linux-stable-4e90ba757b1bc4d6a787e85d0a079d1dbfa9608f.zip
Merge tag 'driver-core-6.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull kernfs bugfix and documentation update from Greg KH: "Here are two changes for 6.9-rc5 that deal with "driver core" stuff, that do the following: - sysfs reference leak fix - embargoed-hardware-issues.rst update for Power Both of these have been in linux-next for over a week with no reported issues" * tag 'driver-core-6.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: Documentation: embargoed-hardware-issues.rst: Add myself for Power fs: sysfs: Fix reference leak in sysfs_break_active_protection()
Diffstat (limited to 'fs')
-rw-r--r--fs/sysfs/file.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index 6b7652fb8050..7cd64021d453 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -463,6 +463,8 @@ struct kernfs_node *sysfs_break_active_protection(struct kobject *kobj,
kn = kernfs_find_and_get(kobj->sd, attr->name);
if (kn)
kernfs_break_active_protection(kn);
+ else
+ kobject_put(kobj);
return kn;
}
EXPORT_SYMBOL_GPL(sysfs_break_active_protection);