dmaengine: idxd: check return result from check_vma() in cdev
authorDave Jiang <dave.jiang@intel.com>
Tue, 25 Feb 2020 16:47:46 +0000 (09:47 -0700)
committerVinod Koul <vkoul@kernel.org>
Mon, 2 Mar 2020 07:13:49 +0000 (12:43 +0530)
commitb391554c61cb353c279523a706734b090aaf9000
tree5ae8af249ed19c15dc64d1f6326793c49affde22
parent01b66a7521274c1f208010db49af2a3d8e274400
dmaengine: idxd: check return result from check_vma() in cdev

The returned result from the check_vma() function in the cdev ->mmap() call
needs to be handled. Add the check and returning error.

Fixes: 42d279f9137a ("dmaengine: idxd: add char driver to expose submission portal to userland")
Reported-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/158264926659.9387.14325163515683047959.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/idxd/cdev.c