diff options
author | James Morris <james.morris@microsoft.com> | 2019-01-22 23:33:10 +0100 |
---|---|---|
committer | James Morris <james.morris@microsoft.com> | 2019-01-22 23:33:10 +0100 |
commit | 9624d5c9c7ff6836bbf9f9b230fd1fcf3d56f91a (patch) | |
tree | e9c1e5d2400ad20c5a9cd633b52a42a00d1d98cb /kernel/seccomp.c | |
parent | LSM: Make some functions static (diff) | |
parent | Linux 5.0-rc3 (diff) | |
download | linux-9624d5c9c7ff6836bbf9f9b230fd1fcf3d56f91a.tar.xz linux-9624d5c9c7ff6836bbf9f9b230fd1fcf3d56f91a.zip |
Merge tag 'v5.0-rc3' into next-general
Sync to Linux 5.0-rc3 to pull in the VFS changes which impacted a lot
of the LSM code.
Diffstat (limited to 'kernel/seccomp.c')
-rw-r--r-- | kernel/seccomp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/seccomp.c b/kernel/seccomp.c index 38a77800def6..05b26db51f41 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 { |