Hi List,
Has anyone sucsessfully applied and used Alex. ip_vs_sync.c patch? I tryed to
patch and even when manually patching the ip_vs_sync.c I get errors when
compiling.
diff -urN kernel-source-2.6.8.orig/net/ipv4/ipvs/ip_vs_sync.c kernel-source-
2.6.8/net/ipv4/ipvs/ip_vs_sync.c
--- linux-2.6.7.orig/net/ipv4/ipvs/ip_vs_sync.c 2004-06-16 07:18:38.000000000
+0200
+++ linux-2.6.7/net/ipv4/ipvs/ip_vs_sync.c 2004-08-17 18:30:36.143940704
+0200
@@ -18,9 +18,11 @@
* messages filtering.
*/
+#define __KERNEL_SYSCALLS__ /* for waitpid */
+
#include <linux/module.h>
#include <linux/slab.h>
-#include <linux/net.h>
+#include <linux/unistd.h>
#include <linux/completion.h>
#include <linux/skbuff.h>
@@ -612,6 +614,7 @@
return len;
}
+static int errno;
static DECLARE_WAIT_QUEUE_HEAD(sync_wait);
static pid_t sync_master_pid = 0;
@@ -840,6 +843,7 @@
int start_sync_thread(int state, char *mcast_ifn, __u8 syncid)
{
DECLARE_COMPLETION(startup);
+ int waitpid_result;
pid_t pid;
if ((state == IP_VS_STATE_MASTER && sync_master_pid) ||
@@ -868,6 +872,15 @@
goto repeat;
}
+ /*
+ * We must reap the fork_sync_thread here. Really needed to not
+ * produce zombies while returning.
+ */
+ if ((waitpid_result = waitpid(pid, NULL, __WCLONE)) != pid) {
+ IP_VS_ERR("%s: waitpid(%d,...) failed, errno %d\n",
+ __FUNCTION__, pid, -waitpid_result);
+ }
+
wait_for_completion(&startup);
return 0;
Thanks
-Brad Chang
-http://www.dotnoc.com
----------------------------------------------------------------
http://www.dotnoc.com hosting the way it should be.
|