diff options
| author | Will Rosenberg <whrosenb@asu.edu> | 2025-11-25 08:13:32 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-11-26 15:19:11 +0100 |
| commit | 382b1e8f30f779af8d6d33268e53df7de579ef3c (patch) | |
| tree | 38a73a8339ff316ff5608ee036fa0fdcfe4a3833 /tools/docs/check-variable-fonts.py | |
| parent | 2467f9928c9824e52718f977009ed3a0cee83dc5 (diff) | |
kernfs: fix memory leak of kernfs_iattrs in __kernfs_new_node
There exists a memory leak of kernfs_iattrs contained as an element
of kernfs_node allocated in __kernfs_new_node(). __kernfs_setattr()
allocates kernfs_iattrs as a sub-object, and the LSM security check
incorrectly errors out and does not free the kernfs_iattrs sub-object.
Make an additional error out case that properly frees kernfs_iattrs if
security_kernfs_init_security() fails.
Fixes: e19dfdc83b60 ("kernfs: initialize security of newly created nodes")
Co-developed-by: Oliver Rosenberg <olrose55@gmail.com>
Signed-off-by: Oliver Rosenberg <olrose55@gmail.com>
Signed-off-by: Will Rosenberg <whrosenb@asu.edu>
Link: https://patch.msgid.link/20251125151332.2010687-1-whrosenb@asu.edu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/docs/check-variable-fonts.py')
0 files changed, 0 insertions, 0 deletions
