Re: [PATCH] iovec: make sure the caller actually wants anything in memcpy_fromiovecend

From: David Miller
Date: Sat Aug 02 2014 - 18:26:41 EST


From: Sasha Levin <sasha.levin@xxxxxxxxxx>
Date: Thu, 31 Jul 2014 23:00:35 -0400

> Check for cases when the caller requests 0 bytes instead of running off
> and dereferencing potentially invalid iovecs.
>
> Signed-off-by: Sasha Levin <sasha.levin@xxxxxxxxxx>

Applied, thanks.

BTW, if you look at the function above this one (memcpy_toiovecend) it avoids
this issue by encompassing all of the logic in a top-level loop which terminates
when len <= 0.
--
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/