Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198839
b: refs/heads/master
c: a48223f
h: refs/heads/master
i:
  198837: aa81380
  198835: 0fc8d4c
  198831: 30af8ce
v: v3
  • Loading branch information
Frederic Weisbecker authored and Linus Torvalds committed May 27, 2010
1 parent b27a562 commit 2e21039
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2a2a400f66e9e23eba960905c36dd37904bd9970
refs/heads/master: a48223f9449d0289fc20cd11a98758109830798e
20 changes: 20 additions & 0 deletions trunk/drivers/misc/lkdtm.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ enum ctype {
UNALIGNED_LOAD_STORE_WRITE,
OVERWRITE_ALLOCATION,
WRITE_AFTER_FREE,
SOFTLOCKUP,
HARDLOCKUP,
HUNG_TASK,
};

static char* cp_name[] = {
Expand All @@ -99,6 +102,9 @@ static char* cp_type[] = {
"UNALIGNED_LOAD_STORE_WRITE",
"OVERWRITE_ALLOCATION",
"WRITE_AFTER_FREE",
"SOFTLOCKUP",
"HARDLOCKUP",
"HUNG_TASK",
};

static struct jprobe lkdtm;
Expand Down Expand Up @@ -320,6 +326,20 @@ static void lkdtm_do_action(enum ctype which)
memset(data, 0x78, len);
break;
}
case SOFTLOCKUP:
preempt_disable();
for (;;)
cpu_relax();
break;
case HARDLOCKUP:
local_irq_disable();
for (;;)
cpu_relax();
break;
case HUNG_TASK:
set_current_state(TASK_UNINTERRUPTIBLE);
schedule();
break;
case NONE:
default:
break;
Expand Down

0 comments on commit 2e21039

Please sign in to comment.