Skip to content

Commit ae74cd1

Browse files
davejiangvinodkoul
authored andcommitted
dmaengine: idxd: Fix ->poll() return value
The fix to block access from different address space did not return a correct value for ->poll() change. kernel test bot reported that a return value of type __poll_t is expected rather than int. Fix to return POLLNVAL to indicate invalid request. Fixes: 8dfa57a ("dmaengine: idxd: Fix allowing write() from different address spaces") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Dave Jiang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent a409e91 commit ae74cd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/dma/idxd/cdev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ static __poll_t idxd_cdev_poll(struct file *filp,
500500
__poll_t out = 0;
501501

502502
if (current->mm != ctx->mm)
503-
return -EPERM;
503+
return POLLNVAL;
504504

505505
poll_wait(filp, &wq->err_queue, wait);
506506
spin_lock(&idxd->dev_lock);

0 commit comments

Comments
 (0)