summaryrefslogtreecommitdiffstats
path: root/kernel/seccomp.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2019-02-14 22:26:50 +0100
committerThomas Gleixner <tglx@linutronix.de>2019-02-14 22:26:50 +0100
commitd869f86645fc07dc83b89b68f1a22d91ebe29439 (patch)
treea3c2c1167bb34c8d0367d77e1a5734fc842d9f30 /kernel/seccomp.c
parent030fc443aef663df71cd834331fd8f1ec10c30c0 (diff)
parent74e96711e3379fc66630f2a1d184947f80cf2c48 (diff)
downloadlinux-stable-d869f86645fc07dc83b89b68f1a22d91ebe29439.tar.gz
linux-stable-d869f86645fc07dc83b89b68f1a22d91ebe29439.tar.bz2
linux-stable-d869f86645fc07dc83b89b68f1a22d91ebe29439.zip
Merge branch 'linus' into irq/core
Pick up upstream changes to avoid conflicts for pending patches.
Diffstat (limited to 'kernel/seccomp.c')
-rw-r--r--kernel/seccomp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/seccomp.c b/kernel/seccomp.c
index d7f538847b84..e815781ed751 100644
--- a/kernel/seccomp.c
+++ b/kernel/seccomp.c
@@ -976,6 +976,9 @@ static int seccomp_notify_release(struct inode *inode, struct file *file)
struct seccomp_filter *filter = file->private_data;
struct seccomp_knotif *knotif;
+ if (!filter)
+ return 0;
+
mutex_lock(&filter->notify_lock);
/*
@@ -1300,6 +1303,7 @@ out:
out_put_fd:
if (flags & SECCOMP_FILTER_FLAG_NEW_LISTENER) {
if (ret < 0) {
+ listener_f->private_data = NULL;
fput(listener_f);
put_unused_fd(listener);
} else {