From: Ian Kent <raven@themaw.net>
To: autofs mailing list <autofs@vger.kernel.org>
Subject: [PATCH 34/34] autofs-5.1.2 - increase worker thread per-thread stack size
Date: Mon, 24 Apr 2017 09:03:07 +0800 [thread overview]
Message-ID: <149299578790.23475.6749618979232753510.stgit@pluto.themaw.net> (raw)
In-Reply-To: <149299547753.23475.9924538846721477415.stgit@pluto.themaw.net>
automount(8) uses a worker thread per-thread stack size of 1M which is
sufficient for its needs.
But some glibc functions (such as nscd_getgr_r()) use alloca() to allocate
working storage that can have an arbitary size. Since alloca() never fails
there is no way to check for stack overflow so I think this usage is wrong
and needs to be fixed.
All that can be done by automount to avoid this is to increase the stack size.
Signed-off-by: Ian Kent <raven@themaw.net>
---
CHANGELOG | 1 +
daemon/automount.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG b/CHANGELOG
index 46487f1..a2a22ce 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -60,6 +60,7 @@ xx/xx/2016 autofs-5.1.3
- fix invalid reference in remount_active_mount().
- use malloc for expanded map location.
- fix offset mount location multiple expansion.
+- increase worker thread per-thread stack size.
15/06/2016 autofs-5.1.2
=======================
diff --git a/daemon/automount.c b/daemon/automount.c
index d27804d..109f8f9 100644
--- a/daemon/automount.c
+++ b/daemon/automount.c
@@ -2476,7 +2476,7 @@ int main(int argc, char *argv[])
#ifdef _POSIX_THREAD_ATTR_STACKSIZE
if (pthread_attr_setstacksize(
- &th_attr_detached, PTHREAD_STACK_MIN*64)) {
+ &th_attr_detached, PTHREAD_STACK_MIN*128)) {
logerr("%s: failed to set stack size thread attribute!",
program);
res = write(start_pipefd[1], pst_stat, sizeof(*pst_stat));
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
prev parent reply other threads:[~2017-04-24 1:03 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-24 1:00 [PATCH 00/34] fyi ... current patch list Ian Kent
2017-04-24 1:00 ` [PATCH 01/34] autofs-5.1.2 - fix included master map not found return Ian Kent
2017-04-24 1:00 ` [PATCH 02/34] autofs-5.1.2 - dont exit on master map read fail timeout Ian Kent
2017-04-24 1:00 ` [PATCH 03/34] autofs-5.1.2 - set sane default master read wait timeout Ian Kent
2017-04-24 1:00 ` [PATCH 04/34] autofs-5.1.2 - don't return until after master map retry read Ian Kent
2017-04-24 1:00 ` [PATCH 05/34] autofs-5.1.2 - make lookup_nss_read_master() return nss status Ian Kent
2017-04-24 1:00 ` [PATCH 06/34] autofs-5.1.2 - check NFS server availability on local mount fallback Ian Kent
2017-04-24 1:00 ` [PATCH 07/34] autofs-5.1.2 - make set_direct_mount_catatonic() more general Ian Kent
2017-04-24 1:00 ` [PATCH 08/34] autofs-5.1.2 - set autofs mounts catatonic at exit Ian Kent
2017-04-24 1:00 ` [PATCH 09/34] autofs-5.1.2 - honor last rw in mount options when doing a bind mount Ian Kent
2017-04-24 1:01 ` [PATCH 10/34] autofs-5.1.2 - fix typos in README.amd-maps Ian Kent
2017-04-24 1:01 ` [PATCH 11/34] autofs-5.1.2 - add ref counting to struct map_source Ian Kent
2017-04-24 1:01 ` [PATCH 12/34] autofs-5.1.2 - add support for amd browsable option Ian Kent
2017-04-24 1:01 ` [PATCH 13/34] autofs-5.1.2 - add function conf_amd_get_map_name() Ian Kent
2017-04-24 1:01 ` [PATCH 14/34] autofs-5.1.2 - add function conf_amd_get_mount_paths() Ian Kent
2017-04-24 1:01 ` [PATCH 15/34] autofs-5.1.2 - include amd mount section mounts in master mounts list Ian Kent
2017-04-24 1:01 ` [PATCH 16/34] autofs-5.1.2 - check for conflicting amd section mounts Ian Kent
2017-04-24 1:01 ` [PATCH 17/34] autofs-5.1.2 - add function conf_amd_get_map_options() Ian Kent
2017-04-24 1:01 ` [PATCH 18/34] autofs-5.1.2 - capture cache option and its settings during parsing Ian Kent
2017-04-24 1:01 ` [PATCH 19/34] autofs-5.1.2 - handle map_option cache for top level mounts Ian Kent
2017-04-24 1:01 ` [PATCH 20/34] autofs-5.1.2 - handle amd cache option all in amd type auto mounts Ian Kent
2017-04-24 1:02 ` [PATCH 21/34] autofs-5.1.2 - fix bogus check in expire_cleanup() Ian Kent
2017-04-24 1:02 ` [PATCH 22/34] autofs-5.1.2 - delay submount exit for amd submounts Ian Kent
2017-04-24 1:02 ` [PATCH 23/34] autofs-5.1.2 - add the mount requestor's pid to pending_args Ian Kent
2017-04-24 1:02 ` [PATCH 24/34] autofs-5.1.2 - create thread-local ID for mount attempts Ian Kent
2017-04-24 1:02 ` [PATCH 25/34] autofs-5.1.2 - log functions to prefix messages with attempt_id if available Ian Kent
2017-04-24 1:02 ` [PATCH 26/34] autofs-5.1.2 - factor out set_thread_mount_request_log_id() Ian Kent
2017-04-24 1:02 ` [PATCH 27/34] autofs-5.1.2 - add config option to use mount request log id Ian Kent
2017-04-24 1:02 ` [PATCH 28/34] autofs-5.1.2 - use autofs_point to store expire timeout where possibe Ian Kent
2017-04-24 1:02 ` [PATCH 29/34] autofs-5.1.2 - fix possible NULL derefernce Ian Kent
2017-04-24 1:02 ` [PATCH 30/34] autofs-5.1.2 - fix work around sss startup delay Ian Kent
2017-04-24 1:02 ` [PATCH 31/34] autofs-5.1.2 - fix invalid reference in remount_active_mount() Ian Kent
2017-04-24 1:02 ` [PATCH 32/34] autofs-5.1.2 - use malloc for expanded map location Ian Kent
2017-04-24 1:03 ` [PATCH 33/34] autofs-5.1.2 - fix offset mount location multiple expansion Ian Kent
2017-04-24 1:03 ` Ian Kent [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=149299578790.23475.6749618979232753510.stgit@pluto.themaw.net \
--to=raven@themaw.net \
--cc=autofs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).