diff options
| author | Andrea Arcangeli <andrea@suse.de> | 2004-08-23 21:26:07 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-23 21:26:07 -0700 |
| commit | 72c21479ae470cc38263a6d4f4fef6f1cbc10034 (patch) | |
| tree | 1798861ff00287c083900a5a83d99a02d6953e77 /kernel | |
| parent | 29d15009ea0163a65b3f46a71d2f16d4150cfc98 (diff) | |
[PATCH] Correctly handle d_path error returns
There's some minor bug in the d_path handling (the nfsd one may not the the
correct fix, there's no failure path for it, so I just terminate the
string, and the last one in the audit subsystem is just a robustness
cleanup if somebody will extend d_path in the future, right now it's a
noop).
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/audit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/audit.c b/kernel/audit.c index 765822b03b91..a86aaf2c8fad 100644 --- a/kernel/audit.c +++ b/kernel/audit.c @@ -708,7 +708,7 @@ void audit_log_d_path(struct audit_buffer *ab, const char *prefix, audit_log_move(ab); avail = sizeof(ab->tmp) - ab->len; p = d_path(dentry, vfsmnt, ab->tmp + ab->len, avail); - if (p == ERR_PTR(-ENAMETOOLONG)) { + if (IS_ERR(p)) { /* FIXME: can we save some information here? */ audit_log_format(ab, "<toolong>"); } else { |
