![]() | |||||||||||||
Messages in this thread Patch in this message |
The previous patch was missing a kfree. So here it goes again: The following patch adds a missing allocation failure check to copy_namespace() in fs/namespace.c Miklos --- fs/namespace.c.orig 2003-12-18 03:59:05.000000000 +0100 +++ fs/namespace.c 2004-02-13 11:04:39.000000000 +0100 @@ -820,6 +820,8 @@ down_write(&tsk->namespace->sem); /* First pass: copy the tree topology */ new_ns->root = copy_tree(namespace->root, namespace->root->mnt_root); + if (!new_ns->root) + goto out_sem; spin_lock(&vfsmount_lock); list_add_tail(&new_ns->list, &new_ns->root->mnt_list); spin_unlock(&vfsmount_lock); @@ -863,6 +865,9 @@ put_namespace(namespace); return 0; +out_sem: + up_write(&tsk->namespace->sem); + kfree(new_ns); out: put_namespace(namespace); return -ENOMEM; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ | ||||||||||||
| Last update: 2005-03-22 13:00 [from the cache] ©2003-2008 | |||||||||||||