diff options
author | Eric Paris <eparis@redhat.com> | 2010-10-25 14:41:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-26 14:37:18 -0400 |
commit | ad16ad00c34d3f320a5876b3d711ef6bc81362e1 (patch) | |
tree | 7cf3b755567fde2850d2ea7f4a186a0dcea6b80f /security/integrity/ima/ima.h | |
parent | 15aac676778f206b42c4d7782b08f89246680485 (diff) |
IMA: use inode->i_lock to protect read and write counters
Currently IMA used the iint->mutex to protect the i_readcount and
i_writecount. This patch uses the inode->i_lock since we are going to
start using in inode objects and that is the most appropriate lock.
Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'security/integrity/ima/ima.h')
-rw-r--r-- | security/integrity/ima/ima.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/security/integrity/ima/ima.h b/security/integrity/ima/ima.h index f7af0110bcde..80aca3d2cb71 100644 --- a/security/integrity/ima/ima.h +++ b/security/integrity/ima/ima.h | |||
@@ -106,6 +106,7 @@ struct ima_iint_cache { | |||
106 | unsigned char flags; | 106 | unsigned char flags; |
107 | u8 digest[IMA_DIGEST_SIZE]; | 107 | u8 digest[IMA_DIGEST_SIZE]; |
108 | struct mutex mutex; /* protects: version, flags, digest */ | 108 | struct mutex mutex; /* protects: version, flags, digest */ |
109 | /* protected by inode->i_lock */ | ||
109 | unsigned int readcount; /* measured files readcount */ | 110 | unsigned int readcount; /* measured files readcount */ |
110 | unsigned int writecount;/* measured files writecount */ | 111 | unsigned int writecount;/* measured files writecount */ |
111 | struct kref refcount; /* ima_iint_cache reference count */ | 112 | struct kref refcount; /* ima_iint_cache reference count */ |