Re: [PATCH] async_tx: fix kmap_atomic usage in async_memcpy

From: Andrew Morton
Date: Thu Jul 19 2007 - 21:33:02 EST


On Thu, 19 Jul 2007 18:12:52 -0700
Dan Williams <dan.j.williams@xxxxxxxxx> wrote:

> Andrew Morton:
> [async_memcpy] is very wrong if both ASYNC_TX_KMAP_DST and
> ASYNC_TX_KMAP_SRC can ever be set. We'll end up using the same kmap
> slot for both src add dest and we get either corrupted data or a BUG.
>
> Evgeniy Polyakov:
> Btw, shouldn't it always be kmap_atomic() even if flag is not set.
> That pages are usual one returned by alloc_page().
>
> So fix the usage of kmap_atomic and kill the ASYNC_TX_KMAP_DST and
> ASYNC_TX_KMAP_SRC flags.
>
> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Cc: Evgeniy Polyakov <johnpol@xxxxxxxxxxx>
> Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx>
> ---
>
> crypto/async_tx/async_memcpy.c | 19 ++++---------------
> drivers/md/raid5.c | 4 ++--
> include/linux/async_tx.h | 6 ------
> 3 files changed, 6 insertions(+), 23 deletions(-)

Neato.

You (or at least, Shannon) run a git tree. I always get confused when
git-tree-owners send me patches, because I expect them to put the
patches into their git trees.

So if you, a git-tree-owner, wish me to merge-test-and-forward a patch,
please explicitly tell me.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/