commit 0932e4fbf2785d0d88156af68576723de7fc7d2f
parent 720572322ee6862177d7e0cc679356ee00ffbddb
Author: Alexandru Ardelean <ardeleanalex@gmail.com>
Date: Thu, 10 Mar 2016 18:41:06 +0200
openvswitch: fix pthread stack size patch
pthread_attr needed to be applied.
otherwhise it still crashes.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/openvswitch/patches/0010-lib-ovs-thread-Ensure-that-thread-stacks-are-always-.patch b/net/openvswitch/patches/0010-lib-ovs-thread-Ensure-that-thread-stacks-are-always-.patch
@@ -51,7 +51,8 @@ index 6ebda07..b0e10ee 100644
@@ -358,10 +377,20 @@ ovs_thread_create(const char *name, void *(*start)(void *), void *arg)
aux->arg = arg;
ovs_strlcpy(aux->name, name, sizeof aux->name);
-
+
+- error = pthread_create(&thread, NULL, ovsthread_wrapper, aux);
+ /* Some small systems use a default stack size as small as 80 kB, but OVS
+ * requires approximately 384 kB according to the following analysis:
+ * http://openvswitch.org/pipermail/dev/2016-January/065049.html
@@ -61,7 +62,7 @@ index 6ebda07..b0e10ee 100644
+ pthread_attr_init(&attr);
+ set_min_stack_size(&attr, 512 * 1024);
+
- error = pthread_create(&thread, NULL, ovsthread_wrapper, aux);
++ error = pthread_create(&thread, &attr, ovsthread_wrapper, aux);
if (error) {
ovs_abort(error, "pthread_create failed");
}