integrity: ima mq_open imbalance msg fix
authorMimi Zohar <zohar@linux.vnet.ibm.com>
Fri, 26 Jun 2009 15:24:05 +0000 (11:24 -0400)
committerJames Morris <jmorris@namei.org>
Sun, 28 Jun 2009 22:56:46 +0000 (08:56 +1000)
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: Sanchin Sant <sanchinp@in.ibm.com>
Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
ipc/mqueue.c

index e35ba2c3a8d770abd7fa97403616dbd8289d26e3..c5e68adc673248b03758bb59d81a5b88f71ef561 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/nsproxy.h>
 #include <linux/pid.h>
 #include <linux/ipc_namespace.h>
+#include <linux/ima.h>
 
 #include <net/sock.h>
 #include "util.h"
@@ -733,6 +734,7 @@ SYSCALL_DEFINE4(mq_open, const char __user *, u_name, int, oflag, mode_t, mode,
                error = PTR_ERR(filp);
                goto out_putfd;
        }
+       ima_counts_get(filp);
 
        fd_install(fd, filp);
        goto out_upsem;