From: Dave Jiang <dave.jiang@intel.com>
To: vkoul@kernel.org, dmaengine@vger.kernel.org
Cc: vinicius.gomes@intel.com, kernel test robot <lkp@intel.com>
Subject: [PATCH] dmaengine: idxd: Fix ->poll() return value
Date: Thu, 8 May 2025 10:05:48 -0700 [thread overview]
Message-ID: <20250508170548.2747425-1-dave.jiang@intel.com> (raw)
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")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202505081851.rwD7jVxg-lkp@intel.com/
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---
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(-)
diff --git a/drivers/dma/idxd/cdev.c b/drivers/dma/idxd/cdev.c
index a2fb2b847752..6d12033649f8 100644
--- a/drivers/dma/idxd/cdev.c
+++ b/drivers/dma/idxd/cdev.c
@@ -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
--
2.49.0
next reply other threads:[~2025-05-08 17:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-08 17:05 Dave Jiang [this message]
2025-05-14 15:02 ` [PATCH] dmaengine: idxd: Fix ->poll() return value Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250508170548.2747425-1-dave.jiang@intel.com \
--to=dave.jiang@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=lkp@intel.com \
--cc=vinicius.gomes@intel.com \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.