OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea6a573
)
dmaengine: idxd: fix wq size store permission state
author
Dave Jiang
<dave.jiang@intel.com>
Wed, 7 Apr 2021 19:59:47 +0000
(12:59 -0700)
committer
Vinod Koul
<vkoul@kernel.org>
Mon, 12 Apr 2021 09:15:50 +0000
(14:45 +0530)
WQ size can only be changed when the device is disabled. Current code
allows change when device is enabled but wq is disabled. Change the check
to detect device state.
Fixes:
c52ca478233c
("dmaengine: idxd: add configuration component of driver")
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link:
https://lore.kernel.org/r/161782558755.107710.18138252584838406025.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/idxd/sysfs.c
patch
|
blob
|
history
diff --git
a/drivers/dma/idxd/sysfs.c
b/drivers/dma/idxd/sysfs.c
index
c27ca01
..
5f7bc4b
100644
(file)
--- a/
drivers/dma/idxd/sysfs.c
+++ b/
drivers/dma/idxd/sysfs.c
@@
-989,7
+989,7
@@
static ssize_t wq_size_store(struct device *dev,
if (!test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags))
return -EPERM;
- if (
wq->state != IDXD_WQ_DIS
ABLED)
+ if (
idxd->state == IDXD_DEV_EN
ABLED)
return -EPERM;
if (size + total_claimed_wq_size(idxd) - wq->size > idxd->max_wq_size)