]> git.karo-electronics.de Git - karo-tx-linux.git/commit
numa, sched, mm: Fix NULL-ptr deref
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Mon, 22 Oct 2012 17:21:32 +0000 (19:21 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 24 Oct 2012 06:52:12 +0000 (08:52 +0200)
commit836e3bf3d85dfe29309cb62dc1714bb89801eea5
tree3b98e4c114ad6ac340570bb74e8cc9aca3f5b639
parent4c7ab9c516a9778cfa2122119210b6513cccbd2f
numa, sched, mm: Fix NULL-ptr deref

Dan reported that there's a possible NULL pointer deref in this logic,
fix that. Further fix it to avoid a possible inf. loop (completely
unlikely in the case no vma is migratable). Also don't endlessly loop
on large length, simply truncate at the end of the address-space and
restart on the next go.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Link: http://lkml.kernel.org/n/tip-mnkio02xxtttiepsg9ek6qkw@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/fair.c