]> git.baikalelectronics.ru Git - kernel.git/commit
slub: Fix kmem_ptr_validate() for non-kernel pointers
authorPekka Enberg <penberg@cs.helsinki.fi>
Wed, 7 Apr 2010 16:23:41 +0000 (19:23 +0300)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 9 Apr 2010 17:09:50 +0000 (10:09 -0700)
commit73f8af18b3c500c586a745e3913761397d1fac0b
tree021d71809197d8a195708ec9b3b114a0aa6eaa9c
parentb7ff7a070af1cf7964007e2cd04b3c0bb0303f05
slub: Fix kmem_ptr_validate() for non-kernel pointers

As suggested by Linus, fix up kmem_ptr_validate() to handle non-kernel pointers
more graciously. The patch changes kmem_ptr_validate() to use the newly
introduced kern_ptr_validate() helper to check that a pointer is a valid kernel
pointer before we attempt to convert it into a 'struct page'.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Nick Piggin <npiggin@suse.de>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Christoph Lameter <cl@linux-foundation.org>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/slub.c