Skip to contentSkip to conversation

aio: add missing dcache flush

PATCH In review Alexey Dobriyan 2 participants 2 messages May 6, 2021 – May 19, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 aio: add missing dcache flush

Ring page is mapped by kernel and updated so dcache must be flushed.

---

Not tested but the usage looks fishy.

 fs/aio.c |    1 +
 1 file changed, 1 insertion(+)
fs/aio.c +1 -0
@@ -653,6 +653,7 @@ static int ioctx_add_table(struct kioctx *ctx, struct mm_struct *mm)
 					ring = kmap_atomic(ctx->ring_pages[0]);
 					ring->id = ctx->id;
 					kunmap_atomic(ring);
+					flush_dcache_page(ctx->ring_pages[0]);
 					return 0;
 				}
 
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Alexey Dobriyan

Ring page is mapped by kernel and updated so dcache must be flushed.

---

Not tested but the usage looks fishy.

 fs/aio.c |    1 +
 1 file changed, 1 insertion(+)

fs/aio.c static int ioctx_add_table(struct kioctx *ctx, struct mm_struct *mm) · line 659

Quoted 7 lines
fs/aio.c +1 -0
@@ -653,6 +653,7 @@ static int ioctx_add_table(struct kioctx *ctx, struct mm_struct *mm)
 					ring = kmap_atomic(ctx->ring_pages[0]);
 					ring->id = ctx->id;
 					kunmap_atomic(ring);
+					flush_dcache_page(ctx->ring_pages[0]);
 					return 0;
 				}
 

Sorry for the late review.