kernel_optimize_test/drivers/ntb
Daniel Verkamp ebaad1322d 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>
2015-06-11 09:27:24 -04:00
..
Kconfig NTB: Enable 32bit Support 2013-09-03 14:48:53 -07:00
Makefile
ntb_hw.c ntb: initialize max_mw for Atom before using it 2015-06-11 09:27:24 -04:00
ntb_hw.h ntb: Adding split BAR support for Haswell platforms 2014-10-17 07:08:51 -04:00
ntb_regs.h ntb: Adding split BAR support for Haswell platforms 2014-10-17 07:08:51 -04:00
ntb_transport.c ntb: Add alignment check to meet hardware requirement 2014-09-14 00:10:38 -04:00