From d35f1926f78cb55ccf3ffd804caf12e68ebc975f Mon Sep 17 00:00:00 2001 From: "Andries E. Brouwer" Date: Sat, 19 Apr 2003 02:21:17 -0700 Subject: [PATCH] [PATCH] fix slab corruption in namespace.c new_ns = kmalloc(sizeof(struct namespace *), GFP_KERNEL); thing wasn't a very good idea. The rest are whitespace cleanups. --- fs/namespace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/namespace.c b/fs/namespace.c index d6c1fb130c30e..2dc2a5f73976d 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -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; -- 2.53.0