Patch "dmaengine: idxd: add RO check for wq max_transfer_size write" has been added to the 5.17-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    dmaengine: idxd: add RO check for wq max_transfer_size write

to the 5.17-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     dmaengine-idxd-add-ro-check-for-wq-max_transfer_size.patch
and it can be found in the queue-5.17 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 683c788056c80f5bf36402168e35615ff659d2f2
Author: Dave Jiang <dave.jiang@xxxxxxxxx>
Date:   Mon Apr 11 15:08:01 2022 -0700

    dmaengine: idxd: add RO check for wq max_transfer_size write
    
    [ Upstream commit 505a2d1032ae656b0a8c736be110255503941cde ]
    
    Block wq_max_transfer_size_store() when the device is configured as
    read-only and not configurable.
    
    Fixes: d7aad5550eca ("dmaengine: idxd: add support for configurable max wq xfer size")
    Reported-by: Bernice Zhang <bernice.zhang@xxxxxxxxx>
    Tested-by: Bernice Zhang <bernice.zhang@xxxxxxxxx>
    Signed-off-by: Dave Jiang <dave.jiang@xxxxxxxxx>
    Link: https://lore.kernel.org/r/164971488154.2200913.10706665404118545941.stgit@xxxxxxxxxxxxxxxxxxxxxxxxxx
    Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/dma/idxd/sysfs.c b/drivers/dma/idxd/sysfs.c
index 6c41d429bd89..dfd549685c46 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;
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux