aboutsummaryrefslogtreecommitdiffstats
path: root/security/integrity/ima/ima_iint.c
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2010-10-25 14:41:32 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-26 14:37:18 -0400
commit497f32337073a2da102c49a53779097b5394711b (patch)
tree203cbcd3f9462737d872e24fb2c847ce9a69de45 /security/integrity/ima/ima_iint.c
parentb575156dafef208415ff0842c392733d16d4ccf1 (diff)
IMA: use unsigned int instead of long for counters
Currently IMA uses 2 longs in struct inode. To save space (and as it seems impossible to overflow 32 bits) we switch these to unsigned int. The switch to unsigned does require slightly different checks for underflow, but it isn't complex. 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_iint.c')
-rw-r--r--security/integrity/ima/ima_iint.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/integrity/ima/ima_iint.c b/security/integrity/ima/ima_iint.c
index 8e64313ed182..db71a13f27fe 100644
--- a/security/integrity/ima/ima_iint.c
+++ b/security/integrity/ima/ima_iint.c
@@ -125,12 +125,12 @@ void iint_free(struct kref *kref)
125 iint->version = 0; 125 iint->version = 0;
126 iint->flags = 0UL; 126 iint->flags = 0UL;
127 if (iint->readcount != 0) { 127 if (iint->readcount != 0) {
128 printk(KERN_INFO "%s: readcount: %ld\n", __func__, 128 printk(KERN_INFO "%s: readcount: %u\n", __func__,
129 iint->readcount); 129 iint->readcount);
130 iint->readcount = 0; 130 iint->readcount = 0;
131 } 131 }
132 if (iint->writecount != 0) { 132 if (iint->writecount != 0) {
133 printk(KERN_INFO "%s: writecount: %ld\n", __func__, 133 printk(KERN_INFO "%s: writecount: %u\n", __func__,
134 iint->writecount); 134 iint->writecount);
135 iint->writecount = 0; 135 iint->writecount = 0;
136 } 136 }