summaryrefslogtreecommitdiff
path: root/lib/genalloc.c
diff options
context:
space:
mode:
authorDaniel Verkamp <daniel.verkamp@intel.com>2015-05-13 22:50:04 (GMT)
committerJon Mason <jdmason@kudzu.us>2015-06-11 13:27:24 (GMT)
commitebaad1322d8080a1a8367ec631b345405d9879e2 (patch)
treef56f5d44895bbf3819ad4ee83ee8f819a7fd9139 /lib/genalloc.c
parent2f4eb6a80e57845ef6f3f7d1cdaaec7a6ab480a9 (diff)
downloadlinux-ebaad1322d8080a1a8367ec631b345405d9879e2.tar.xz
ntb: initialize max_mw for Atom before using it
Commit ab760a0 (ntb: Adding split BAR support for Haswell platforms) changed ntb_device's mw from a fixed-size array into a pointer that is allocated based on limits.max_mw; however, on Atom platforms, max_mw is not initialized until ntb_device_setup(), which happens after the allocation. Fill out max_mw in ntb_atom_detect() to match ntb_xeon_detect(); this happens before the use of max_mw in the ndev->mw allocation. Fixes a null pointer dereference on Atom platforms with ntb hardware. v2: fix typo (mw_max should be max_mw) Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Acked-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'lib/genalloc.c')
0 files changed, 0 insertions, 0 deletions