Messages in this thread Patch in this message | | | From | Neil Brown <> | Date | Mon, 19 Dec 2005 10:10:51 +1100 | Subject | Re: [2.6 patch] i386: always use 4k stacks |
| |
On Friday December 16, vonbrand@inf.utfsm.cl wrote: > Horst von Brand <vonbrand@inf.utfsm.cl> wrote: > [Forgot the attachment]
Thanks... Based on that, I tried the following patch, and it didn't change the amount of space that is reserved on the stack. gcc version 4.0.3 20051201 (prerelease) (Debian 4.0.2-5)
Further, earlier version of gcc miscompile this construct. They effectively treat that in-line structure as a 'static', and seeing notify_change changes .ia_valid, the next time it is called contents of the structure will be wrong.
NeilBrown
### Diffstat output ./fs/nfsd/vfs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff ./fs/nfsd/vfs.c~current~ ./fs/nfsd/vfs.c --- ./fs/nfsd/vfs.c~current~ 2005-12-19 09:44:20.000000000 +1100 +++ ./fs/nfsd/vfs.c 2005-12-19 09:56:46.000000000 +1100 @@ -923,11 +923,9 @@ nfsd_vfs_write(struct svc_rqst *rqstp, s /* clear setuid/setgid flag after write */ if (err >= 0 && (inode->i_mode & (S_ISUID | S_ISGID))) { - struct iattr ia; - ia.ia_valid = ATTR_KILL_SUID | ATTR_KILL_SGID; - down(&inode->i_sem); - notify_change(dentry, &ia); + notify_change(dentry, &((struct iattr) + {.ia_valid = ATTR_KILL_SUID | ATTR_KILL_SGID})); up(&inode->i_sem); } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |