Commit 46690f37 authored by Mimi Zohar's avatar Mimi Zohar Committed by James Morris

integrity: ima mq_open imbalance msg fix

This patch fixes an imbalance message as reported by Sanchin Sant.
As we don't need to measure the message queue, just increment the
counters.
Reported-by: default avatarSanchin Sant <sanchinp@in.ibm.com>
Signed-off-by: default avatarMimi Zohar <zohar@us.ibm.com>
Acked-by: default avatarSerge Hallyn <serue@us.ibm.com>
Signed-off-by: default avatarJames Morris <jmorris@namei.org>
parent 4142ac67
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <linux/nsproxy.h> #include <linux/nsproxy.h>
#include <linux/pid.h> #include <linux/pid.h>
#include <linux/ipc_namespace.h> #include <linux/ipc_namespace.h>
#include <linux/ima.h>
#include <net/sock.h> #include <net/sock.h>
#include "util.h" #include "util.h"
...@@ -733,6 +734,7 @@ SYSCALL_DEFINE4(mq_open, const char __user *, u_name, int, oflag, mode_t, mode, ...@@ -733,6 +734,7 @@ SYSCALL_DEFINE4(mq_open, const char __user *, u_name, int, oflag, mode_t, mode,
error = PTR_ERR(filp); error = PTR_ERR(filp);
goto out_putfd; goto out_putfd;
} }
ima_counts_get(filp);
fd_install(fd, filp); fd_install(fd, filp);
goto out_upsem; goto out_upsem;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment