integrity: shmem zero fix
Subsystems (2)
PATCH 1/1 integrity: shmem zero fix
Based on comments from Mike Frysinger and Randy Dunlap,
- moved ima.h include before CONFIG_SHMEM test
- added 'struct linux_binprm' in ima.h
---
include/linux/ima.h +2 -0
@@ -12,6 +12,8 @@#ifndef _LINUX_IMA_H#define _LINUX_IMA_H +struct linux_binprm ; +#ifdef CONFIG_IMA extern int ima_bprm_check (struct linux_binprm *bprm);extern int ima_inode_alloc (struct inode *inode);
mm/shmem.c +1 -1
@@ -28,6 +28,7 @@#include <linux/mm.h> #include <linux/module.h> #include <linux/swap.h> +#include <linux/ima.h> static struct vfsmount *shm_mnt;
@@ -59,7 +60,6 @@ static struct vfsmount *shm_mnt;#include <linux/highmem.h> #include <linux/seq_file.h> #include <linux/magic.h> -#include <linux/ima.h> #include <asm/uaccess.h> #include <asm/div64.h>
Signature · 1 line
1.5.6.6
Quoted 3 lines · Mimi Zohar
Based on comments from Mike Frysinger and Randy Dunlap,
- movedima.hinclude beforeCONFIG_SHMEMtest
- added 'structlinux_binprm' inima.h
please move the linux/fs.h include in linux/ima.h to match linux_binprm location while you're at it
-mike
Quoted 7 lines · Mike Frysinger
Quoted 3 lines · Mimi Zohar
Based on comments from Mike Frysinger and Randy Dunlap,
- movedima.hinclude beforeCONFIG_SHMEMtest
- added 'structlinux_binprm' inima.hplease move the
linux/fs.hinclude inlinux/ima.hto matchlinux_binprmlocation while you're at it
Yes, that's the only difference with what I tested:
-#include <linux/fs.h>
-
#ifndef _LINUX_IMA_H
#define _LINUX_IMA_H
+#include <linux/fs.h>
+struct linux_binprm;
+
Signature · 1 line
~Randy
Andrew Morton
maintainerQuoted 7 lines · On Mon, 9 Feb 2009 19:03:51 -0500 Mike Frysinger <[email protected]> wrote:
Quoted 3 lines · Mimi Zohar
Based on comments from Mike Frysinger and Randy Dunlap,
- movedima.hinclude beforeCONFIG_SHMEMtest
- added 'structlinux_binprm' inima.hplease move the
linux/fs.hinclude inlinux/ima.hto matchlinux_binprmlocation while you're at it
Please write a full changelog too. That one didn't tell us what was being fixed.
As it is presumably a compilation fix, please include the compiler error messages in the changelog, along with a description of what circumstances cause the error to occur.
Thanks.