projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8eabf42
)
x86/intel_rdt: Fix memory leak on mount failure
author
Vikas Shivappa
<
[email protected]
>
Mon, 26 Jun 2017 18:55:49 +0000
(11:55 -0700)
committer
Thomas Gleixner
<
[email protected]
>
Fri, 30 Jun 2017 19:20:00 +0000
(21:20 +0200)
If mount fails, the kn_info directory is not freed causing memory leak.
Add the missing error handling path.
Fixes: 4e978d06dedb ("x86/intel_rdt: Add "info" files to resctrl file system")
Signed-off-by: Vikas Shivappa <
[email protected]
>
Signed-off-by: Thomas Gleixner <
[email protected]
>
Cc:
[email protected]
Cc:
[email protected]
Cc:
[email protected]
Cc:
[email protected]
Cc:
[email protected]
Cc:
[email protected]
Cc:
[email protected]
Link:
http://lkml.kernel.org/r/
[email protected]
arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
patch
|
blob
|
history
diff --git
a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
index f5af0cc7eb0d18bc9f52177c182d73500e7f3e7f..9257bd9dc6640bd2b1eff8e6cfb7021139332530 100644
(file)
--- a/
arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
+++ b/
arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
@@
-856,11
+856,13
@@
static struct dentry *rdt_mount(struct file_system_type *fs_type,
dentry = kernfs_mount(fs_type, flags, rdt_root,
RDTGROUP_SUPER_MAGIC, NULL);
if (IS_ERR(dentry))
- goto out_
cdp
;
+ goto out_
destroy
;
static_branch_enable(&rdt_enable_key);
goto out;
+out_destroy:
+ kernfs_remove(kn_info);
out_cdp:
cdp_disable();
out: