percpu: avoid calling __pcpu_ptr_to_addr(NULL)
authorAndrew Morton <akpm@linux-foundation.org>
Fri, 8 Jan 2010 22:42:39 +0000 (14:42 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 11 Jan 2010 17:34:04 +0000 (09:34 -0800)
commit129182e5626972ac0df85d43a36dd46ad61c64e1
treec91d17c697aa29d284dbe065423e01ca7020db73
parent8767ba2796a1c894e6d9524584a26a8224f0543d
percpu: avoid calling __pcpu_ptr_to_addr(NULL)

__pcpu_ptr_to_addr() can be overridden by the architecture and might not
behave well if passed a NULL pointer.  So avoid calling it until we have
verified that its arg is not NULL.

Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/percpu.c