diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2010-02-18 11:05:13 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2010-02-18 11:05:13 +0000 |
commit | bba1ff4cf64a095d9b6c193e8a5d19da3f6e1a16 (patch) | |
tree | d9168d3cd893efa91d5212cfeafc9596ba508a53 | |
parent | 96fd197a5ee0c3a94a317f04e0d2c088fc20d039 (diff) | |
download | fuse-bba1ff4cf64a095d9b6c193e8a5d19da3f6e1a16.tar.gz |
* Fix stack alignment for clone()
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | include/fuse_lowlevel.h | 1 | ||||
-rw-r--r-- | util/fusermount.c | 9 |
3 files changed, 9 insertions, 5 deletions
@@ -1,3 +1,7 @@ +2010-02-03 Miklos Szeredi <miklos@szeredi.hu> + + * Fix stack alignment for clone() + 2010-02-01 Miklos Szeredi <miklos@szeredi.hu> * Released 2.8.3 diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h index 8c04cd4..2855e51 100644 --- a/include/fuse_lowlevel.h +++ b/include/fuse_lowlevel.h @@ -411,6 +411,7 @@ struct fuse_lowlevel_ops { * * Valid replies: * fuse_reply_buf + * fuse_reply_iov * fuse_reply_err * * @param req request handle diff --git a/util/fusermount.c b/util/fusermount.c index f0d8732..6123c66 100644 --- a/util/fusermount.c +++ b/util/fusermount.c @@ -262,9 +262,8 @@ static int check_is_mount_child(void *p) static pid_t clone_newns(void *a) { - long long buf[16384]; - size_t stacksize = sizeof(buf) / 2; - char *stack = ((char *) buf) + stacksize; + char buf[131072]; + char *stack = buf + (sizeof(buf) / 2 - ((size_t) buf & 15)); #ifdef __ia64__ extern int __clone2(int (*fn)(void *), @@ -272,8 +271,8 @@ static pid_t clone_newns(void *a) int flags, void *arg, pid_t *ptid, void *tls, pid_t *ctid); - return __clone2(check_is_mount_child, stack, stacksize, CLONE_NEWNS, a, - NULL, NULL, NULL); + return __clone2(check_is_mount_child, stack, sizeof(buf) / 2, + CLONE_NEWNS, a, NULL, NULL, NULL); #else return clone(check_is_mount_child, stack, CLONE_NEWNS, a); #endif |