* [PATCH] aio: add missing dcache flush
@ 2021-05-06 20:01 Alexey Dobriyan
2021-05-19 18:40 ` Jeff Moyer
0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2021-05-06 20:01 UTC (permalink / raw)
To: bcrl, akpm; +Cc: linux-aio, linux-kernel
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;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] aio: add missing dcache flush
2021-05-06 20:01 [PATCH] aio: add missing dcache flush Alexey Dobriyan
@ 2021-05-19 18:40 ` Jeff Moyer
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Moyer @ 2021-05-19 18:40 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: bcrl, akpm, linux-aio, linux-kernel
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-19 18:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-06 20:01 [PATCH] aio: add missing dcache flush Alexey Dobriyan
2021-05-19 18:40 ` Jeff Moyer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.