1 From: Dean Roe <roe@sgi.com>
2 Subject: Prevent NULL pointer deref in grab_swap_token
5 grab_swap_token() assumes that the current process has an mm struct,
6 which is not true for kernel threads invoking get_user_pages(). Since
7 this should be extremely rare, just return from grab_swap_token()
8 without doing anything.
10 Signed-off-by: Dean Roe <roe@sgi.com>
11 Acked-by: mason@suse.de
12 Acked-by: okir@suse.de
16 1 file changed, 3 insertions(+)
20 @@ -31,6 +31,9 @@ void grab_swap_token(void)
24 + if (current->mm == NULL)
28 current_interval = global_faults - current->mm->faultstamp;