]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] fix slab corruption in namespace.c
authorAndries E. Brouwer <andries.brouwer@cwi.nl>
Sat, 19 Apr 2003 09:21:17 +0000 (02:21 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Sat, 19 Apr 2003 09:21:17 +0000 (02:21 -0700)
new_ns = kmalloc(sizeof(struct namespace *), GFP_KERNEL);
thing wasn't a very good idea.

The rest are whitespace cleanups.

fs/namespace.c

index d6c1fb130c30e3ba66bcf24e90741d06651cb4bf..2dc2a5f73976d4401ba4d912bfb7c1bf79883538 100644 (file)
@@ -52,7 +52,7 @@ struct vfsmount *alloc_vfsmnt(char *name)
                INIT_LIST_HEAD(&mnt->mnt_list);
                if (name) {
                        int size = strlen(name)+1;
-                       char * newname = kmalloc(size, GFP_KERNEL);
+                       char *newname = kmalloc(size, GFP_KERNEL);
                        if (newname) {
                                memcpy(newname, name, size);
                                mnt->mnt_devname = newname;
@@ -774,7 +774,7 @@ int copy_namespace(int flags, struct task_struct *tsk)
 
        get_namespace(namespace);
 
-       if (! (flags & CLONE_NEWNS))
+       if (!(flags & CLONE_NEWNS))
                return 0;
 
        if (!capable(CAP_SYS_ADMIN)) {
@@ -782,7 +782,7 @@ int copy_namespace(int flags, struct task_struct *tsk)
                return -EPERM;
        }
 
-       new_ns = kmalloc(sizeof(struct namespace *), GFP_KERNEL);
+       new_ns = kmalloc(sizeof(struct namespace), GFP_KERNEL);
        if (!new_ns)
                goto out;