[Drbd-dev] [PATCH] drbd: Fix kernel_sendmsg() usage
viro at ZenIV.linux.org.uk
Tue Nov 8 17:13:24 CET 2016
On Tue, Nov 08, 2016 at 07:49:24AM -0800, Christoph Hellwig wrote:
> On Tue, Nov 08, 2016 at 11:43:09AM +0100, Richard Weinberger wrote:
> > Don't pass a size larger than iov_len to kernel_sendmsg().
> > Otherwise it will cause a NULL pointer deref when kernel_sendmsg()
> > returns with rv < size.
> > Although the issue exists since day 0, only on non-ancient kernels
> > that contain change 57be5bdad759 ("ip: convert tcp_sendmsg() to iov_iter
> > primitives") it seems to trigger .
> The real fix here is to convert it to the right primitive, e.g. take
> Al's patch from here:
_After_ the backport-friendly part, please. And that's my ACK-by
on Richard's variant.
More information about the drbd-dev