OSDN Git Service

staging: lustre: libcfs: check mask returned by cpumask_of_node
authorLiang Zhen <liang.zhen@intel.com>
Sun, 18 Sep 2016 20:38:40 +0000 (16:38 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Sep 2016 08:03:41 +0000 (10:03 +0200)
commitc658b69656bb3081e1cd4ba93d2f2d8626903716
tree54967f20e9edd352e8495a2bc2379c6ebdb619d7
parent6314ccb684857b8026f42a44a6dbc371548caae9
staging: lustre: libcfs: check mask returned by cpumask_of_node

cpumask_of_node can return NULL if NUMA node is unavailable,
in this case cfs_node_to_cpumask will try to copy from NULL
and cause kernel panic.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5751
Reviewed-on: http://review.whamcloud.com/13207
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c