Title: [7184] trunk/fs/binfmt_flat.c: use the FLAT shared lib fix that was merged into mainline
Revision
7184
Author
vapier
Date
2009-08-13 15:01:04 -0400 (Thu, 13 Aug 2009)

Log Message

use the FLAT shared lib fix that was merged into mainline

Modified Paths


Diff

Modified: trunk/fs/binfmt_flat.c (7183 => 7184)


--- trunk/fs/binfmt_flat.c	2009-08-13 18:38:47 UTC (rev 7183)
+++ trunk/fs/binfmt_flat.c	2009-08-13 19:01:04 UTC (rev 7184)
@@ -850,12 +850,12 @@
 	/* Open the file up */
 	bprm.filename = buf;
 	bprm.file = open_exec(bprm.filename);
-	bprm.cred = NULL;
 	res = PTR_ERR(bprm.file);
 	if (IS_ERR(bprm.file))
 		return res;
 
 	bprm.cred = prepare_exec_creds();
+	res = -ENOMEM;
 	if (!bprm.cred)
 		goto out;
 
@@ -863,15 +863,13 @@
 
 	if (!IS_ERR_VALUE(res))
 		res = load_flat_file(&bprm, libs, id, NULL, NULL);
+
+	abort_creds(bprm.cred);
+
 out:
-	if (bprm.cred)
-		abort_creds(bprm.cred);
+	allow_write_access(bprm.file);
+	fput(bprm.file);
 
-	if (bprm.file) {
-		allow_write_access(bprm.file);
-		fput(bprm.file);
-		bprm.file = NULL;
-	}
 	return(res);
 }
 
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to