Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287215
b: refs/heads/master
c: 9261818
h: refs/heads/master
i:
  287213: 1dd40c6
  287211: 2a47521
  287207: 56b072e
  287199: f4a6509
v: v3
  • Loading branch information
Cong Wang authored and Linus Torvalds committed Feb 4, 2012
1 parent a986118 commit 0a46735
Show file tree
Hide file tree
Showing 2 changed files with 6 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: 99f02ef1f18631eb0a4e0ea0a3d56878dbcb4b90
refs/heads/master: 92618184cb92c5b39d4d8573572d576f9ccb3c28
6 changes: 5 additions & 1 deletion trunk/drivers/misc/lkdtm.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,17 +354,21 @@ static void lkdtm_do_action(enum ctype which)
static void lkdtm_handler(void)
{
unsigned long flags;
bool do_it = false;

spin_lock_irqsave(&count_lock, flags);
count--;
printk(KERN_INFO "lkdtm: Crash point %s of type %s hit, trigger in %d rounds\n",
cp_name_to_str(cpoint), cp_type_to_str(cptype), count);

if (count == 0) {
lkdtm_do_action(cptype);
do_it = true;
count = cpoint_count;
}
spin_unlock_irqrestore(&count_lock, flags);

if (do_it)
lkdtm_do_action(cptype);
}

static int lkdtm_register_cpoint(enum cname which)
Expand Down

0 comments on commit 0a46735

Please sign in to comment.