]> git.karo-electronics.de Git - karo-tx-linux.git/commit
x86/intel_rdt: Protect info directory from removal
authorFenghua Yu <fenghua.yu@intel.com>
Sat, 12 Nov 2016 01:02:36 +0000 (17:02 -0800)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 15 Nov 2016 17:35:49 +0000 (18:35 +0100)
commitf57b308728902d9ffade53466e9201e999a870e4
tree42a8304a80b5ab8a9ca8ea591035621d843ffa5f
parent458b0d6e751b04216873a5ee9c899be2cd2f80f3
x86/intel_rdt: Protect info directory from removal

The info directory and the per-resource subdirectories of the info
directory have no reference to a struct rdtgroup in kn->priv. An attempt to
remove one of those directories results in a NULL pointer dereference.

Protect the directories from removal and return -EPERM instead of -ENOENT.

[ tglx: Massaged changelog ]

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Cc: "Ravi V Shankar" <ravi.v.shankar@intel.com>
Cc: "Tony Luck" <tony.luck@intel.com>
Cc: "Sai Prakhya" <sai.praneeth.prakhya@intel.com>
Cc: "Vikas Shivappa" <vikas.shivappa@linux.intel.com>
Cc: "Ingo Molnar" <mingo@elte.hu>
Cc: "H. Peter Anvin" <h.peter.anvin@intel.com>
Link: http://lkml.kernel.org/r/1478912558-55514-1-git-send-email-fenghua.yu@intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/cpu/intel_rdt_rdtgroup.c