Commit 18a61e4a authored by Ankita Garg's avatar Ankita Garg Committed by Linus Torvalds

[PATCH] Fix for LKDTM MEM_SWAPOUT crashpoint

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: default avatarAnkita Garg <ankita@in.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 4b96b1a1
...@@ -157,8 +157,8 @@ void jp_ll_rw_block(int rw, int nr, struct buffer_head *bhs[]) ...@@ -157,8 +157,8 @@ void jp_ll_rw_block(int rw, int nr, struct buffer_head *bhs[])
struct scan_control; struct scan_control;
unsigned long jp_shrink_page_list(struct list_head *page_list, unsigned long jp_shrink_inactive_list(unsigned long max_scan,
struct scan_control *sc) struct zone *zone, struct scan_control *sc)
{ {
lkdtm_handler(); lkdtm_handler();
jprobe_return(); jprobe_return();
...@@ -297,8 +297,8 @@ int lkdtm_module_init(void) ...@@ -297,8 +297,8 @@ int lkdtm_module_init(void)
lkdtm.entry = (kprobe_opcode_t*) jp_ll_rw_block; lkdtm.entry = (kprobe_opcode_t*) jp_ll_rw_block;
break; break;
case MEM_SWAPOUT: case MEM_SWAPOUT:
lkdtm.kp.symbol_name = "shrink_page_list"; lkdtm.kp.symbol_name = "shrink_inactive_list";
lkdtm.entry = (kprobe_opcode_t*) jp_shrink_page_list; lkdtm.entry = (kprobe_opcode_t*) jp_shrink_inactive_list;
break; break;
case TIMERADD: case TIMERADD:
lkdtm.kp.symbol_name = "hrtimer_start"; lkdtm.kp.symbol_name = "hrtimer_start";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment