diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2017-02-11 18:14:00 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2017-02-11 18:23:15 +0100 |
commit | 2a9eda1229c9d5d7150acdd3d8dd4908fbc784a8 (patch) | |
tree | cf4e7b34ed524a005cbaeeb568c0fc6e654dbfca /libdaemon | |
parent | 8296b99a89b849d7d7b5dcac6214582b3eaad639 (diff) | |
download | lvm2-2a9eda1229c9d5d7150acdd3d8dd4908fbc784a8.tar.gz |
mem: add extra mem pages for pthread stack
Some archs can use even 64K pages and then lvm2 runs into trouble if
the stack is 'too small' to fit extra page capturing stack overwrite.
So when lvm2 limits stack - add extra mem page - be it 4K or 64K.
Relates to ppc64le bug: https://bugzilla.redhat.com/1387279
Diffstat (limited to 'libdaemon')
-rw-r--r-- | libdaemon/server/daemon-server.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libdaemon/server/daemon-server.c b/libdaemon/server/daemon-server.c index 6af6de99b..10cc8f747 100644 --- a/libdaemon/server/daemon-server.c +++ b/libdaemon/server/daemon-server.c @@ -42,7 +42,7 @@ static int _pthread_create(pthread_t *t, void *(*fun)(void *), void *arg, int st /* * We use a smaller stack since it gets preallocated in its entirety */ - pthread_attr_setstacksize(&attr, stacksize); + pthread_attr_setstacksize(&attr, stacksize + getpagesize()); return pthread_create(t, &attr, fun, arg); } #endif |