projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
568b212
)
dmaengine: idxd: fix wq slot allocation index check
author
Dave Jiang
<dave.jiang@intel.com>
Thu, 22 Jul 2021 17:54:10 +0000
(10:54 -0700)
committer
Vinod Koul
<vkoul@kernel.org>
Wed, 28 Jul 2021 12:25:40 +0000
(17:55 +0530)
The sbitmap wait and allocate routine checks the index that is returned
from sbitmap_queue_get(). It should be idxd >= 0 as 0 is also a valid
index. This fixes issue where submission path hangs when WQ size is 1.
Fixes:
0705107fcc80
("dmaengine: idxd: move submission to sbitmap_queue")
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link:
https://lore.kernel.org/r/162697645067.3478714.506720687816951762.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/idxd/submit.c
patch
|
blob
|
history
diff --git
a/drivers/dma/idxd/submit.c
b/drivers/dma/idxd/submit.c
index
6ef704d
..
65b0130
100644
(file)
--- a/
drivers/dma/idxd/submit.c
+++ b/
drivers/dma/idxd/submit.c
@@
-59,7
+59,7
@@
struct idxd_desc *idxd_alloc_desc(struct idxd_wq *wq, enum idxd_op_type optype)
if (signal_pending_state(TASK_INTERRUPTIBLE, current))
break;
idx = sbitmap_queue_get(sbq, &cpu);
- if (idx > 0)
+ if (idx >
=
0)
break;
schedule();
}