diff options
author | NeilBrown <neilb@suse.de> | 2007-01-29 16:19:52 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-01-30 11:26:45 -0500 |
commit | 34e9a63b4f3e169b583f6ba2e26356ecbf932fba (patch) | |
tree | 445562aa7159ef7ec3d29f8e1cc18d578d9bfcae /fs | |
parent | d019bcf0eb9a55c51f1c57659f923d356b4675e1 (diff) |
[PATCH] knfsd: ratelimit some nfsd messages that are triggered by external events
Also remove {NFSD,RPC}_PARANOIA as having the defines doesn't really add
anything.
The printks covered by RPC_PARANOIA were triggered by badly formatted
packets and so should be ratelimited.
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfsd/export.c | 1 | ||||
-rw-r--r-- | fs/nfsd/nfsfh.c | 14 | ||||
-rw-r--r-- | fs/nfsd/vfs.c | 1 |
3 files changed, 6 insertions, 10 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 248dd92e6a56..49c310b84923 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <linux/lockd/bind.h> | 35 | #include <linux/lockd/bind.h> |
36 | 36 | ||
37 | #define NFSDDBG_FACILITY NFSDDBG_EXPORT | 37 | #define NFSDDBG_FACILITY NFSDDBG_EXPORT |
38 | #define NFSD_PARANOIA 1 | ||
39 | 38 | ||
40 | typedef struct auth_domain svc_client; | 39 | typedef struct auth_domain svc_client; |
41 | typedef struct svc_export svc_export; | 40 | typedef struct svc_export svc_export; |
diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c index b06bf9f70efc..98338a569dc0 100644 --- a/fs/nfsd/nfsfh.c +++ b/fs/nfsd/nfsfh.c | |||
@@ -24,8 +24,6 @@ | |||
24 | #include <linux/nfsd/nfsd.h> | 24 | #include <linux/nfsd/nfsd.h> |
25 | 25 | ||
26 | #define NFSDDBG_FACILITY NFSDDBG_FH | 26 | #define NFSDDBG_FACILITY NFSDDBG_FH |
27 | #define NFSD_PARANOIA 1 | ||
28 | /* #define NFSD_DEBUG_VERBOSE 1 */ | ||
29 | 27 | ||
30 | 28 | ||
31 | static int nfsd_nr_verified; | 29 | static int nfsd_nr_verified; |
@@ -230,13 +228,12 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access) | |||
230 | error = nfserrno(PTR_ERR(dentry)); | 228 | error = nfserrno(PTR_ERR(dentry)); |
231 | goto out; | 229 | goto out; |
232 | } | 230 | } |
233 | #ifdef NFSD_PARANOIA | 231 | |
234 | if (S_ISDIR(dentry->d_inode->i_mode) && | 232 | if (S_ISDIR(dentry->d_inode->i_mode) && |
235 | (dentry->d_flags & DCACHE_DISCONNECTED)) { | 233 | (dentry->d_flags & DCACHE_DISCONNECTED)) { |
236 | printk("nfsd: find_fh_dentry returned a DISCONNECTED directory: %s/%s\n", | 234 | printk("nfsd: find_fh_dentry returned a DISCONNECTED directory: %s/%s\n", |
237 | dentry->d_parent->d_name.name, dentry->d_name.name); | 235 | dentry->d_parent->d_name.name, dentry->d_name.name); |
238 | } | 236 | } |
239 | #endif | ||
240 | 237 | ||
241 | fhp->fh_dentry = dentry; | 238 | fhp->fh_dentry = dentry; |
242 | fhp->fh_export = exp; | 239 | fhp->fh_export = exp; |
@@ -267,12 +264,13 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access) | |||
267 | /* Finally, check access permissions. */ | 264 | /* Finally, check access permissions. */ |
268 | error = nfsd_permission(exp, dentry, access); | 265 | error = nfsd_permission(exp, dentry, access); |
269 | 266 | ||
270 | #ifdef NFSD_PARANOIA_EXTREME | ||
271 | if (error) { | 267 | if (error) { |
272 | printk("fh_verify: %s/%s permission failure, acc=%x, error=%d\n", | 268 | dprintk("fh_verify: %s/%s permission failure, " |
273 | dentry->d_parent->d_name.name, dentry->d_name.name, access, (error >> 24)); | 269 | "acc=%x, error=%d\n", |
270 | dentry->d_parent->d_name.name, | ||
271 | dentry->d_name.name, | ||
272 | access, (error >> 24)); | ||
274 | } | 273 | } |
275 | #endif | ||
276 | out: | 274 | out: |
277 | if (exp && !IS_ERR(exp)) | 275 | if (exp && !IS_ERR(exp)) |
278 | exp_put(exp); | 276 | exp_put(exp); |
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 5d32e5fa697e..8283236c6a0f 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c | |||
@@ -59,7 +59,6 @@ | |||
59 | #include <asm/uaccess.h> | 59 | #include <asm/uaccess.h> |
60 | 60 | ||
61 | #define NFSDDBG_FACILITY NFSDDBG_FILEOP | 61 | #define NFSDDBG_FACILITY NFSDDBG_FILEOP |
62 | #define NFSD_PARANOIA | ||
63 | 62 | ||
64 | 63 | ||
65 | /* We must ignore files (but only files) which might have mandatory | 64 | /* We must ignore files (but only files) which might have mandatory |