Skip to content

Commit cfe65bd

Browse files
authored
Merge pull request 504ensicsLabs#110 from qodroi/master
[x86] Fix kmap_atomic raises scheduling while atomic bug
2 parents fb7b743 + b2812e8 commit cfe65bd

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
Module.symvers
1010
modules.order
11+
*.mod
1112
*.mod.c
1213
*.cmd
1314
.tmp_versions/

src/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,13 +301,17 @@ static void write_range(struct resource * res) {
301301
* If we need to compute the digest or compress the output
302302
* take a snapshot of the page. Otherwise save some cycles.
303303
*/
304+
#ifdef LIME_USE_KMAP_ATOMIC
305+
preempt_enable();
306+
#endif
304307
if (no_overlap) {
305308
copy_page(vpage, v);
306309
s = write_vaddr(vpage, is);
307310
} else {
308311
s = write_vaddr(v, is);
309312
}
310313
#ifdef LIME_USE_KMAP_ATOMIC
314+
preempt_disable();
311315
kunmap_atomic(v);
312316
#else
313317
kunmap(p);

0 commit comments

Comments
 (0)