Hello Christoph! THX for the links! And hey, you did all the work already, including the DKMS packet! Many many thanks!
(We also include a patch important for kernels 4.0-4.9 that probably has not made it into Debian or Proxmox repositories yet)
The DRBD 8.4.9-1 package doesn't contain this patch. It has been commited to the GIT repo on 2016-11-08 two weeks later than the package release date. Your DKMS package contains a slightly modified version of the patch, but still fixes the issue. @Linbit: BUT!!! I just checked the DRDB9 code. In file "drbd_transport_tcp.c" function "_dtt_send" and the code is still the same like in the DRDB8 version. Attached you will find a patch to fix this issue. I haven't compiled it, because I have currently no compiler on my server and also no virtual machine available. The fix is pretty simple and should compile flawlessly. And you should remove the comment above concerning tcp_sendmsg, because tcp_sendmsg DOES use it's send parameter see: http://lxr.linux.no/linux+v4.4.21/net/ipv4/tcp.c (line 1103) There is another comment "/* THINK ..." which I don't know if it should be kept. @R. Kammerer: In a recent message in this thread I wrote: "And the most important, I try to share it afterwards with others." You see, it is past 4 o'clock in the night and I am helping to improve your driver, even when you recently wrote I write "BS"! > No, currently (and kind of Thanks to a certain bug), you don't ;-) A big THANK you for fixing this! > For DRBD9 and drbd-utils there is a Launchpad PPA targeting Ubuntu trusty & > xenial. Their xenial packages might work with Debian jessie. > https://launchpad.net/~linbit/+archive/ubuntu/linbit-drbd9-stack This is good news also. I really didn't analyse the drbd-utils code, but for me it seems you can use this user-mode tools for all DRBD versions. So I would prefer the variant from your Debian package, as Proxmox VE 4.x is Debian based, beside the Kernel (Ubuntu version). The 9.0.5-1 driver package is a DKMS, so it will compile for each Kernel. Also here I say THX to Linbit for providing this package! So my originally questions are now mostly answered, as far as they affect my test HA cluster. There is still one thing open, the DRDB9 storage plugin package for Proxmox VE 4.x . BR, Jasmin
>From 36f1ffa748c57c262a8375cc4c37803ef28d51fc Mon Sep 17 00:00:00 2001 From: Jasmin Jessich <[email protected]> Date: Sun, 27 Nov 2016 02:52:33 +0100 Subject: [PATCH] drbd9: Fix kernel_sendmsg() usage - potential NULL deref 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. I found this during a recent code review triggered by a email on the drbd-user mailing list. It is a simple port of this commit http://git.drbd.org/drbd-8.4.git/commit/e0645836e870346cafe688cbdd8ec29092f6cdb5 Signed-off-by: Jasmin Jessich <[email protected]> --- drbd/drbd_transport_tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drbd/drbd_transport_tcp.c b/drbd/drbd_transport_tcp.c index f7e937f..ed2ff8e 100644 --- a/drbd/drbd_transport_tcp.c +++ b/drbd/drbd_transport_tcp.c @@ -229,7 +229,7 @@ static int _dtt_send(struct drbd_tcp_transport *tcp_transport, struct socket *so * do we need to block DRBD_SIG if sock == &meta.socket ?? * otherwise wake_asender() might interrupt some send_*Ack ! */ - rv = kernel_sendmsg(socket, &msg, &iov, 1, size); + rv = kernel_sendmsg(socket, &msg, &iov, 1, iov.iov_len); if (rv == -EAGAIN) { struct drbd_transport *transport = &tcp_transport->transport; enum drbd_stream stream = -- 1.9.1
_______________________________________________ drbd-user mailing list [email protected] http://lists.linbit.com/mailman/listinfo/drbd-user
