Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250799
b: refs/heads/master
c: be30b16
h: refs/heads/master
i:
  250797: c835c72
  250795: 2f75915
  250791: 471b4bc
  250783: 06f1916
v: v3
  • Loading branch information
Eric Paris committed Apr 28, 2011
1 parent 5dc7da1 commit 3c47e9e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 03a4c0182a156547edd5f2717c1702590fe36bbf
refs/heads/master: be30b16d43f4781406de0c08c96501dae4cc5a77
32 changes: 13 additions & 19 deletions trunk/security/selinux/ss/policydb.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,32 +423,26 @@ static int (*index_f[SYM_NUM]) (void *key, void *datum, void *datap) =
};

#ifdef DEBUG_HASHES
static void symtab_hash_eval(struct symtab *s)
static void hash_eval(struct hashtab *h, const char *hash_name)
{
int i;

for (i = 0; i < SYM_NUM; i++) {
struct hashtab *h = s[i].table;
struct hashtab_info info;
struct hashtab_info info;

hashtab_stat(h, &info);
printk(KERN_DEBUG "SELinux: %s: %d entries and %d/%d buckets used, "
"longest chain length %d\n", symtab_name[i], h->nel,
info.slots_used, h->size, info.max_chain_len);
}
hashtab_stat(h, &info);
printk(KERN_DEBUG "SELinux: %s: %d entries and %d/%d buckets used, "
"longest chain length %d\n", hash_name, h->nel,
info.slots_used, h->size, info.max_chain_len);
}

static void rangetr_hash_eval(struct hashtab *h)
static void symtab_hash_eval(struct symtab *s)
{
struct hashtab_info info;
int i;

hashtab_stat(h, &info);
printk(KERN_DEBUG "SELinux: rangetr: %d entries and %d/%d buckets used, "
"longest chain length %d\n", h->nel,
info.slots_used, h->size, info.max_chain_len);
for (i = 0; i < SYM_NUM; i++)
hash_eval(s[i].table, symtab_name[i]);
}

#else
static inline void rangetr_hash_eval(struct hashtab *h)
static inline void hash_eval(struct hashtab *h, char *hash_name)
{
}
#endif
Expand Down Expand Up @@ -1802,7 +1796,7 @@ static int range_read(struct policydb *p, void *fp)
rt = NULL;
r = NULL;
}
rangetr_hash_eval(p->range_tr);
hash_eval(p->range_tr, "rangetr");
rc = 0;
out:
kfree(rt);
Expand Down

0 comments on commit 3c47e9e

Please sign in to comment.