Skip to content

Commit 18a61e4

Browse files
Ankita GargLinus Torvalds
authored andcommitted
[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: Ankita Garg <ankita@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 4b96b1a commit 18a61e4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎drivers/misc/lkdtm.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ void jp_ll_rw_block(int rw, int nr, struct buffer_head *bhs[])
157157

158158
struct scan_control;
159159

160-
unsigned long jp_shrink_page_list(struct list_head *page_list,
161-
struct scan_control *sc)
160+
unsigned long jp_shrink_inactive_list(unsigned long max_scan,
161+
struct zone *zone, struct scan_control *sc)
162162
{
163163
lkdtm_handler();
164164
jprobe_return();
@@ -297,8 +297,8 @@ int lkdtm_module_init(void)
297297
lkdtm.entry = (kprobe_opcode_t*) jp_ll_rw_block;
298298
break;
299299
case MEM_SWAPOUT:
300-
lkdtm.kp.symbol_name = "shrink_page_list";
301-
lkdtm.entry = (kprobe_opcode_t*) jp_shrink_page_list;
300+
lkdtm.kp.symbol_name = "shrink_inactive_list";
301+
lkdtm.entry = (kprobe_opcode_t*) jp_shrink_inactive_list;
302302
break;
303303
case TIMERADD:
304304
lkdtm.kp.symbol_name = "hrtimer_start";

0 commit comments

Comments
 (0)