On Friday December 16, [email protected] wrote:
> Horst von Brand <[email protected]> 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]