* [-mm patch] fs/nfsd/vfs.c: fix possible runtime stack corruption
@ 2005-12-13 23:06 Adrian Bunk
0 siblings, 0 replies; only message in thread
From: Adrian Bunk @ 2005-12-13 23:06 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Neil Brown, Dave Kleikamp, Andrew Morton, nfs, linux-kernel
Compiling 2.6.15-rc5-mm2 with CONFIG_NFSD_V4=n and CONFIG_NFSD_V2_ACL=y
or CONFIG_NFSD_V3_ACL=y results due to
add-vfs_-helpers-for-xattr-operations.patch in the following:
<-- snip -->
...
CC [M] fs/nfsd/vfs.o
fs/nfsd/vfs.c: In function 'nfsd_getxattr':
fs/nfsd/vfs.c:376: warning: implicit declaration of function 'vfs_getxattr'
fs/nfsd/vfs.c: In function 'nfsd_set_posix_acl':
fs/nfsd/vfs.c:1931: warning: implicit declaration of function 'vfs_setxattr'
fs/nfsd/vfs.c:1936: warning: implicit declaration of function 'vfs_removexattr'
...
<-- snip -->
The possible stack corruption if gcc guessed the types of the parameters
of any of these functions wrong is obvious.
Given the -Werror-implicit-function-declaration flag, gcc would
abort compilation in such cases:
<-- snip -->
...
CC [M] fs/nfsd/vfs.o
fs/nfsd/vfs.c: In function 'nfsd_getxattr':
fs/nfsd/vfs.c:376: error: implicit declaration of function 'vfs_getxattr'
fs/nfsd/vfs.c: In function 'nfsd_set_posix_acl':
fs/nfsd/vfs.c:1931: error: implicit declaration of function 'vfs_setxattr'
fs/nfsd/vfs.c:1936: error: implicit declaration of function 'vfs_removexattr'
make[2]: *** [fs/nfsd/vfs.o] Error 1
<-- snip -->
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.15-rc5-mm2-modular/fs/nfsd/vfs.c.old 2005-12-13 22:05:39.000000000 +0100
+++ linux-2.6.15-rc5-mm2-modular/fs/nfsd/vfs.c 2005-12-13 22:05:55.000000000 +0100
@@ -48,8 +48,8 @@
#include <linux/fsnotify.h>
#include <linux/posix_acl.h>
#include <linux/posix_acl_xattr.h>
-#ifdef CONFIG_NFSD_V4
#include <linux/xattr.h>
+#ifdef CONFIG_NFSD_V4
#include <linux/nfs4.h>
#include <linux/nfs4_acl.h>
#include <linux/nfsd_idmap.h>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-12-13 23:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-13 23:06 [-mm patch] fs/nfsd/vfs.c: fix possible runtime stack corruption Adrian Bunk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome