Re: [PATCH] drbd: Fix kernel_sendmsg() usage

2016-11-09 Thread Jens Axboe
On 11/09/2016 08:32 AM, Lars Ellenberg wrote: On Tue, Nov 08, 2016 at 09:52:04AM -0700, Jens Axboe wrote: This should go into 4.9, and into all stable branches since and including v4.0, which is the first to contain the exposing change. It is correct for all stable branches older than that as w

Re: [Drbd-dev] [PATCH] drbd: Fix kernel_sendmsg() usage

2016-11-09 Thread Lars Ellenberg
On Wed, Nov 09, 2016 at 04:47:15PM +0100, Richard Weinberger wrote: > > Should I sent two patches, one that applies to 4.5 and later, > > and one that applies to 2.6.33 ... 4.4, or are you or stable > > willing to resolve the trivial "missing comment block" conflict yourself? > > BTW: Why did you

Re: [PATCH] drbd: Fix kernel_sendmsg() usage

2016-11-09 Thread Richard Weinberger
On 09.11.2016 16:32, Lars Ellenberg wrote: > On Tue, Nov 08, 2016 at 09:52:04AM -0700, Jens Axboe wrote: This should go into 4.9, and into all stable branches since and including v4.0, which is the first to contain the exposing change. It is correct for all stable branches

Re: [PATCH] drbd: Fix kernel_sendmsg() usage

2016-11-09 Thread Lars Ellenberg
On Tue, Nov 08, 2016 at 09:52:04AM -0700, Jens Axboe wrote: > > > This should go into 4.9, > > > and into all stable branches since and including v4.0, > > > which is the first to contain the exposing change. > > > > > > It is correct for all stable branches older than that as well > > > (which co

Re: [PATCH] drbd: Fix kernel_sendmsg() usage

2016-11-08 Thread Jens Axboe
On Tue, Nov 08 2016, Richard Weinberger wrote: > On 08.11.2016 14:43, Lars Ellenberg wrote: > > From 3a5859e696178e31a25e65de58c461046fc52beb Mon Sep 17 00:00:00 2001 > > From: Richard Weinberger > > Date: Tue, 8 Nov 2016 11:43:09 +0100 > > Subject: [PATCH] drbd:

Re: [PATCH] drbd: Fix kernel_sendmsg() usage

2016-11-08 Thread Al Viro
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.

Re: [PATCH] drbd: Fix kernel_sendmsg() usage

2016-11-08 Thread Richard Weinberger
Christoph, On 08.11.2016 16:49, 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. >> >> Althou

Re: [PATCH] drbd: Fix kernel_sendmsg() usage

2016-11-08 Thread Christoph Hellwig
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 > t

Re: [PATCH] drbd: Fix kernel_sendmsg() usage

2016-11-08 Thread Christoph Lechleitner
Am 2016-11-08 um 14:43 schrieb Lars Ellenberg: > From 3a5859e696178e31a25e65de58c461046fc52beb Mon Sep 17 00:00:00 2001 > From: Richard Weinberger > Date: Tue, 8 Nov 2016 11:43:09 +0100 > Subject: [PATCH] drbd: Fix kernel_sendmsg() usage - potential NULL deref > drbd: Fix kernel_

Re: [PATCH] drbd: Fix kernel_sendmsg() usage

2016-11-08 Thread Richard Weinberger
Lars, On 08.11.2016 14:43, Lars Ellenberg wrote: > From 3a5859e696178e31a25e65de58c461046fc52beb Mon Sep 17 00:00:00 2001 > From: Richard Weinberger > Date: Tue, 8 Nov 2016 11:43:09 +0100 > Subject: [PATCH] drbd: Fix kernel_sendmsg() usage - potential NULL deref > drbd: Fix

[PATCH] drbd: Fix kernel_sendmsg() usage

2016-11-08 Thread Richard Weinberger
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 primitiv