dmaengine: idxd: Fix allowing write() from different address spaces
authorVinicius Costa Gomes <vinicius.gomes@intel.com>
Mon, 21 Apr 2025 17:03:37 +0000 (10:03 -0700)
committerVinod Koul <vkoul@kernel.org>
Wed, 23 Apr 2025 12:04:17 +0000 (17:34 +0530)
commit8dfa57aabff625bf445548257f7711ef294cd30e
treedaf11a4980ad76559fb801b96383869a927ab16a
parentfca280992af8c2fbd511bc43f65abb4a17363f2f
dmaengine: idxd: Fix allowing write() from different address spaces

Check if the process submitting the descriptor belongs to the same
address space as the one that opened the file, reject otherwise.

Fixes: 6827738dc684 ("dmaengine: idxd: add a write() method for applications to submit work")
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/20250421170337.3008875-1-dave.jiang@intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/idxd/cdev.c