diff options
-rw-r--r-- | kernel/sched/fair.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 4603d6cb9e25..5eea8707234a 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c | |||
@@ -793,8 +793,11 @@ unsigned int sysctl_numa_balancing_scan_delay = 1000; | |||
793 | 793 | ||
794 | static void task_numa_placement(struct task_struct *p) | 794 | static void task_numa_placement(struct task_struct *p) |
795 | { | 795 | { |
796 | int seq = ACCESS_ONCE(p->mm->numa_scan_seq); | 796 | int seq; |
797 | 797 | ||
798 | if (!p->mm) /* for example, ksmd faulting in a user's mm */ | ||
799 | return; | ||
800 | seq = ACCESS_ONCE(p->mm->numa_scan_seq); | ||
798 | if (p->numa_scan_seq == seq) | 801 | if (p->numa_scan_seq == seq) |
799 | return; | 802 | return; |
800 | p->numa_scan_seq = seq; | 803 | p->numa_scan_seq = seq; |