From: Vinod Koul <vkoul@kernel.org>
To: Dave Jiang <dave.jiang@intel.com>
Cc: dmaengine@vger.kernel.org
Subject: Re: [PATCH] dmaengine: idxd: add RO check for wq max_transfer_size write
Date: Wed, 20 Apr 2022 17:17:57 +0530 [thread overview]
Message-ID: <Yl/y7dN7w05ea2o0@matsya> (raw)
In-Reply-To: <164971488154.2200913.10706665404118545941.stgit@djiang5-desk3.ch.intel.com>
On 11-04-22, 15:08, Dave Jiang wrote:
> Block wq_max_transfer_size_store() when the device is configured as
> read-only and not configurable.
Applied, thanks
>
> Fixes: d7aad5550eca ("dmaengine: idxd: add support for configurable max wq xfer size")
> Reported-by: Bernice Zhang <bernice.zhang@intel.com>
> Tested-by: Bernice Zhang <bernice.zhang@intel.com>
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> ---
> drivers/dma/idxd/sysfs.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/dma/idxd/sysfs.c b/drivers/dma/idxd/sysfs.c
> index 7e19ab92b61a..ec13ca4808f9 100644
> --- a/drivers/dma/idxd/sysfs.c
> +++ b/drivers/dma/idxd/sysfs.c
> @@ -905,6 +905,9 @@ static ssize_t wq_max_transfer_size_store(struct device *dev, struct device_attr
> u64 xfer_size;
> int rc;
>
> + if (!test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags))
> + return -EPERM;
> +
> if (wq->state != IDXD_WQ_DISABLED)
> return -EPERM;
>
>
--
~Vinod
prev parent reply other threads:[~2022-04-20 11:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-11 22:08 [PATCH] dmaengine: idxd: add RO check for wq max_transfer_size write Dave Jiang
2022-04-20 11:47 ` Vinod Koul [this message]
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=Yl/y7dN7w05ea2o0@matsya \
--to=vkoul@kernel.org \
--cc=dave.jiang@intel.com \
--cc=dmaengine@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox