aio: add missing dcache flush
diff mbox series

Message ID YJRLAPfYuNaCWq6T@localhost.localdomain
State New, archived
Headers show
Series
  • aio: add missing dcache flush
Related show

Commit Message

Alexey Dobriyan May 6, 2021, 8:01 p.m. UTC
Ring page is mapped by kernel and updated so dcache must be flushed.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

	Not tested but the usage looks fishy.

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

Comments

Jeff Moyer May 19, 2021, 6:40 p.m. UTC | #1
Alexey Dobriyan <adobriyan@gmail.com> writes:

> Ring page is mapped by kernel and updated so dcache must be flushed.
>
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> ---
>
> 	Not tested but the usage looks fishy.
>
>  fs/aio.c |    1 +
>  1 file changed, 1 insertion(+)
>
> --- a/fs/aio.c
> +++ b/fs/aio.c
> @@ -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.

Reviewed-by: Jeff Moyer <jmoyer@redhat.com>

Patch
diff mbox series

--- a/fs/aio.c
+++ b/fs/aio.c
@@ -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;
 				}