misc: mic: scif bug fix for vmalloc_to_page crash
authorSudeep Dutt <sudeep.dutt@intel.com>
Wed, 22 Jul 2015 18:50:10 +0000 (11:50 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jul 2015 04:25:36 +0000 (21:25 -0700)
commita63444375f08a18a6b2286351606f08d6e9fa63d
tree50b8d06e46c69e55148b2ba1565479a743bdebd6
parent68d35c7b3b1aa686e3039eb2626bf5e3ea8dbe81
misc: mic: scif bug fix for vmalloc_to_page crash

v4.2-rc1 enabled huge page support for ioremap(..).
Calling vmalloc_to_page after v4.2-rc1 results in the
crash shown below on the host upon booting X100 coprocessors:

BUG: unable to handle kernel paging request at ffffc47c00000000
IP: [<ffffffff811a2c0c>] vmalloc_to_page+0x6c/0xb0

This patch fixes this crash by obtaining the fake struct page
pointer which is required to be passed into dma_map_sg(..)
by calling pfn_to_page(..) instead of vmalloc_to_page(..).

Link: https://lkml.org/lkml/2015/7/18/110
Reviewed-by: Nikhil Rao <nikhil.rao@intel.com>
Suggested-by: Toshi Kani <toshi.kani@hp.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Sudeep Dutt <sudeep.dutt@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mic/scif/scif_nodeqp.c