Skip to contentSkip to conversation

integrity: ima mq_open imbalance msg fix

PATCH In review Mimi Zohar 2 participants 2 messages Jun 26, 2009

lore
Share & tools
lore

Mimi Zohar

author
#0 lore raw

PATCH 1/1 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.

---
 ipc/mqueue.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
ipc/mqueue.c +2 -0
index e35ba2c..c5e68ad 100644
@@ -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;
Signature · 1 line
1.6.0.6
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Mimi Zohar

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.

Thanks, Mimi and Sanchin.

-serge

Quoted 26 lines
---
 ipc/mqueue.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
ipc/mqueue.c +2 -0
index e35ba2c..c5e68ad 100644
@@ -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;
Signature · 1 line
1.6.0.6