You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qubes-linux-kernel/patches.fixes/novfs-fix-oops-in-scope-fin...

32 lines
775 B

From: Sankar P <psankar@novell.com>
Subject: novfs: fix an oops in novfs scope-finding code
References: bnc#588579
Patch-mainline: no
This patch removes an attempt to dereference a NULL pointer,
on failed memory allocation. The addscope boolean takes care
of the ScopeUserName field's validity.
Signed-off-by: Sankar P <psankar@novell.com>
Acked-by: Jan Kara <jack@suse.cz>
---
fs/novfs/scope.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- a/fs/novfs/scope.c
+++ b/fs/novfs/scope.c
@@ -170,10 +170,9 @@ static struct novfs_scope_list *Scope_Fi
kfree(scope);
scope = NULL;
}
- }
-
- if (addscope) {
- novfs_add_to_root(scope->ScopeUserName);
+
+ if (scope && addscope)
+ novfs_add_to_root(scope->ScopeUserName);
}
}