Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 272132
b: refs/heads/master
c: 7731113
h: refs/heads/master
v: v3
  • Loading branch information
Akinobu Mita authored and Linus Torvalds committed Nov 1, 2011
1 parent 5512767 commit 43168b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 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: 16fb951237c2b0b28037b992ee44e7ee401c30d1
refs/heads/master: 77311139f364d7f71fc9ba88f59fd90e60205007
4 changes: 3 additions & 1 deletion trunk/mm/debug-pagealloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <linux/mm.h>
#include <linux/page-debug-flags.h>
#include <linux/poison.h>
#include <linux/ratelimit.h>

static inline void set_page_poison(struct page *page)
{
Expand Down Expand Up @@ -59,6 +60,7 @@ static bool single_bit_flip(unsigned char a, unsigned char b)

static void check_poison_mem(unsigned char *mem, size_t bytes)
{
static DEFINE_RATELIMIT_STATE(ratelimit, 5 * HZ, 10);
unsigned char *start;
unsigned char *end;

Expand All @@ -74,7 +76,7 @@ static void check_poison_mem(unsigned char *mem, size_t bytes)
break;
}

if (!printk_ratelimit())
if (!__ratelimit(&ratelimit))
return;
else if (start == end && single_bit_flip(*start, PAGE_POISON))
printk(KERN_ERR "pagealloc: single bit error\n");
Expand Down

0 comments on commit 43168b6

Please sign in to comment.