Skip to content

Commit

Permalink
[PATCH] Fix for LKDTM MEM_SWAPOUT crashpoint
Browse files Browse the repository at this point in the history
The MEM_SWAPOUT crashpoint in LKDTM could be broken as some compilers
inline the call to shrink_page_list() and symbol lookup for this function
name fails.  Replacing it with the function shrink_inactive_list(), which
is the only function calling shrink_page_list().

Signed-off-by: Ankita Garg <ankita@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Ankita Garg authored and Linus Torvalds committed Nov 6, 2006
1 parent 4b96b1a commit 18a61e4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/misc/lkdtm.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ void jp_ll_rw_block(int rw, int nr, struct buffer_head *bhs[])

struct scan_control;

unsigned long jp_shrink_page_list(struct list_head *page_list,
struct scan_control *sc)
unsigned long jp_shrink_inactive_list(unsigned long max_scan,
struct zone *zone, struct scan_control *sc)
{
lkdtm_handler();
jprobe_return();
Expand Down Expand Up @@ -297,8 +297,8 @@ int lkdtm_module_init(void)
lkdtm.entry = (kprobe_opcode_t*) jp_ll_rw_block;
break;
case MEM_SWAPOUT:
lkdtm.kp.symbol_name = "shrink_page_list";
lkdtm.entry = (kprobe_opcode_t*) jp_shrink_page_list;
lkdtm.kp.symbol_name = "shrink_inactive_list";
lkdtm.entry = (kprobe_opcode_t*) jp_shrink_inactive_list;
break;
case TIMERADD:
lkdtm.kp.symbol_name = "hrtimer_start";
Expand Down

0 comments on commit 18a61e4

Please sign in to comment.