diff options
Diffstat (limited to 'security')
| -rw-r--r-- | security/selinux/ss/ebitmap.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/security/selinux/ss/ebitmap.c b/security/selinux/ss/ebitmap.c index 5ae8c61b75bf..8f624f80055b 100644 --- a/security/selinux/ss/ebitmap.c +++ b/security/selinux/ss/ebitmap.c | |||
| @@ -362,7 +362,7 @@ int ebitmap_read(struct ebitmap *e, void *fp) | |||
| 362 | count = le32_to_cpu(buf[2]); | 362 | count = le32_to_cpu(buf[2]); |
| 363 | 363 | ||
| 364 | if (mapunit != BITS_PER_U64) { | 364 | if (mapunit != BITS_PER_U64) { |
| 365 | printk(KERN_ERR "SELinux: ebitmap: map size %u does not " | 365 | pr_err("SELinux: ebitmap: map size %u does not " |
| 366 | "match my size %zd (high bit was %d)\n", | 366 | "match my size %zd (high bit was %d)\n", |
| 367 | mapunit, BITS_PER_U64, e->highbit); | 367 | mapunit, BITS_PER_U64, e->highbit); |
| 368 | goto bad; | 368 | goto bad; |
| @@ -383,19 +383,19 @@ int ebitmap_read(struct ebitmap *e, void *fp) | |||
| 383 | for (i = 0; i < count; i++) { | 383 | for (i = 0; i < count; i++) { |
| 384 | rc = next_entry(&startbit, fp, sizeof(u32)); | 384 | rc = next_entry(&startbit, fp, sizeof(u32)); |
| 385 | if (rc < 0) { | 385 | if (rc < 0) { |
| 386 | printk(KERN_ERR "SELinux: ebitmap: truncated map\n"); | 386 | pr_err("SELinux: ebitmap: truncated map\n"); |
| 387 | goto bad; | 387 | goto bad; |
| 388 | } | 388 | } |
| 389 | startbit = le32_to_cpu(startbit); | 389 | startbit = le32_to_cpu(startbit); |
| 390 | 390 | ||
| 391 | if (startbit & (mapunit - 1)) { | 391 | if (startbit & (mapunit - 1)) { |
| 392 | printk(KERN_ERR "SELinux: ebitmap start bit (%d) is " | 392 | pr_err("SELinux: ebitmap start bit (%d) is " |
| 393 | "not a multiple of the map unit size (%u)\n", | 393 | "not a multiple of the map unit size (%u)\n", |
| 394 | startbit, mapunit); | 394 | startbit, mapunit); |
| 395 | goto bad; | 395 | goto bad; |
| 396 | } | 396 | } |
| 397 | if (startbit > e->highbit - mapunit) { | 397 | if (startbit > e->highbit - mapunit) { |
| 398 | printk(KERN_ERR "SELinux: ebitmap start bit (%d) is " | 398 | pr_err("SELinux: ebitmap start bit (%d) is " |
| 399 | "beyond the end of the bitmap (%u)\n", | 399 | "beyond the end of the bitmap (%u)\n", |
| 400 | startbit, (e->highbit - mapunit)); | 400 | startbit, (e->highbit - mapunit)); |
| 401 | goto bad; | 401 | goto bad; |
| @@ -405,8 +405,7 @@ int ebitmap_read(struct ebitmap *e, void *fp) | |||
| 405 | struct ebitmap_node *tmp; | 405 | struct ebitmap_node *tmp; |
| 406 | tmp = kmem_cache_zalloc(ebitmap_node_cachep, GFP_KERNEL); | 406 | tmp = kmem_cache_zalloc(ebitmap_node_cachep, GFP_KERNEL); |
| 407 | if (!tmp) { | 407 | if (!tmp) { |
| 408 | printk(KERN_ERR | 408 | pr_err("SELinux: ebitmap: out of memory\n"); |
| 409 | "SELinux: ebitmap: out of memory\n"); | ||
| 410 | rc = -ENOMEM; | 409 | rc = -ENOMEM; |
| 411 | goto bad; | 410 | goto bad; |
| 412 | } | 411 | } |
| @@ -418,7 +417,7 @@ int ebitmap_read(struct ebitmap *e, void *fp) | |||
| 418 | e->node = tmp; | 417 | e->node = tmp; |
| 419 | n = tmp; | 418 | n = tmp; |
| 420 | } else if (startbit <= n->startbit) { | 419 | } else if (startbit <= n->startbit) { |
| 421 | printk(KERN_ERR "SELinux: ebitmap: start bit %d" | 420 | pr_err("SELinux: ebitmap: start bit %d" |
| 422 | " comes after start bit %d\n", | 421 | " comes after start bit %d\n", |
| 423 | startbit, n->startbit); | 422 | startbit, n->startbit); |
| 424 | goto bad; | 423 | goto bad; |
| @@ -426,7 +425,7 @@ int ebitmap_read(struct ebitmap *e, void *fp) | |||
| 426 | 425 | ||
| 427 | rc = next_entry(&map, fp, sizeof(u64)); | 426 | rc = next_entry(&map, fp, sizeof(u64)); |
| 428 | if (rc < 0) { | 427 | if (rc < 0) { |
| 429 | printk(KERN_ERR "SELinux: ebitmap: truncated map\n"); | 428 | pr_err("SELinux: ebitmap: truncated map\n"); |
| 430 | goto bad; | 429 | goto bad; |
| 431 | } | 430 | } |
| 432 | map = le64_to_cpu(map); | 431 | map = le64_to_cpu(map); |
