summaryrefslogtreecommitdiffstats
path: root/kernel/kcov.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2016-08-01 19:34:01 +0200
committerBjorn Helgaas <bhelgaas@google.com>2016-08-01 19:34:01 +0200
commit9454c23852ca6d7aec89fd6fd46a046c323caac3 (patch)
tree794be65345027b5adea3720a43124fee338333a5 /kernel/kcov.c
parentMerge branches 'pci/host-aardvark', 'pci/host-altera', 'pci/host-dra7xx', 'pc... (diff)
parentPCI: Spread interrupt vectors in pci_alloc_irq_vectors() (diff)
downloadlinux-9454c23852ca6d7aec89fd6fd46a046c323caac3.tar.xz
linux-9454c23852ca6d7aec89fd6fd46a046c323caac3.zip
Merge branch 'pci/msi-affinity' into next
Conflicts: drivers/nvme/host/pci.c
Diffstat (limited to 'kernel/kcov.c')
-rw-r--r--kernel/kcov.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/kcov.c b/kernel/kcov.c
index a02f2dddd1d7..8d44b3fea9d0 100644
--- a/kernel/kcov.c
+++ b/kernel/kcov.c
@@ -264,7 +264,12 @@ static const struct file_operations kcov_fops = {
static int __init kcov_init(void)
{
- if (!debugfs_create_file("kcov", 0600, NULL, NULL, &kcov_fops)) {
+ /*
+ * The kcov debugfs file won't ever get removed and thus,
+ * there is no need to protect it against removal races. The
+ * use of debugfs_create_file_unsafe() is actually safe here.
+ */
+ if (!debugfs_create_file_unsafe("kcov", 0600, NULL, NULL, &kcov_fops)) {
pr_err("failed to create kcov in debugfs\n");
return -ENOMEM;
}