Skip to contentSkip to conversation

dmaengine: idxd: Fix ->poll() return value

PATCH Applied Dave Jiang 2 participants 2 messages May 8, 2025 – May 14, 2025

Subsystems (2)
lore
Share & tools
lore

Dave Jiang

author reviewer
#0 lore raw

PATCH 1/1 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 8dfa57aabff6 ("dmaengine: idxd: Fix allowing write() from different address spaces")

---

Hi Vinod, this fixes a patch that's queued in dmaengine/fixes.

 drivers/dma/idxd/cdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/idxd/cdev.c +1 -1
index a2fb2b847752..6d12033649f8 100644
@@ -500,7 +500,7 @@ static __poll_t idxd_cdev_poll(struct file *filp,
 	__poll_t out = 0;
 
 	if (current->mm != ctx->mm)
-		return -EPERM;
+		return POLLNVAL;
 
 	poll_wait(filp, &wq->err_queue, wait);
 	spin_lock(&idxd->dev_lock);

base-commit: 305245a2e1d633e5f821178c98c6d6132cea2bdb

Signature · 1 line
2.49.0
maintainer Applied
#1 lore raw
Quoted 6 lines · Dave Jiang

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.

Applied, thanks!

[1/1] dmaengine: idxd: Fix ->poll() return value

      commit: ae74cd15ade833adc289279b5c6f12e78f64d4d7

Best regards,

Signature · 1 line
~Vinod