Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=402acd29e552cb80109d1d5c0ada53f634465d87
Commit:     402acd29e552cb80109d1d5c0ada53f634465d87
Parent:     5bd5f5812bfa753218e02cb773e06ede48055798
Author:     NeilBrown <[EMAIL PROTECTED]>
AuthorDate: Wed May 9 02:34:52 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed May 9 12:30:54 2007 -0700

    knfsd: avoid use of unitialised variables on error path when nfs exports
    
    We need to zero various parts of 'exp' before any 'goto out', otherwise when
    we go to free the contents...  we die.
    
    Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
    Cc: <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/nfsd/export.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index 6f24768..79bd03b 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -469,6 +469,13 @@ static int svc_export_parse(struct cache_detail *cd, char 
*mesg, int mlen)
        nd.dentry = NULL;
        exp.ex_path = NULL;
 
+       /* fs locations */
+       exp.ex_fslocs.locations = NULL;
+       exp.ex_fslocs.locations_count = 0;
+       exp.ex_fslocs.migrated = 0;
+
+       exp.ex_uuid = NULL;
+
        if (mesg[mlen-1] != '\n')
                return -EINVAL;
        mesg[mlen-1] = 0;
@@ -509,13 +516,6 @@ static int svc_export_parse(struct cache_detail *cd, char 
*mesg, int mlen)
        if (exp.h.expiry_time == 0)
                goto out;
 
-       /* fs locations */
-       exp.ex_fslocs.locations = NULL;
-       exp.ex_fslocs.locations_count = 0;
-       exp.ex_fslocs.migrated = 0;
-
-       exp.ex_uuid = NULL;
-
        /* flags */
        err = get_int(&mesg, &an_int);
        if (err == -ENOENT)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to