git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gpio: sysfs: fix gpio attribute-creation race
[pandora-kernel.git]
/
fs
/
binfmt_flat.c
diff --git
a/fs/binfmt_flat.c
b/fs/binfmt_flat.c
index
397d305
..
1bffbe0
100644
(file)
--- a/
fs/binfmt_flat.c
+++ b/
fs/binfmt_flat.c
@@
-820,6
+820,8
@@
static int load_flat_shared_library(int id, struct lib_info *libs)
int res;
char buf[16];
int res;
char buf[16];
+ memset(&bprm, 0, sizeof(bprm));
+
/* Create the file name */
sprintf(buf, "/lib/lib%d.so", id);
/* Create the file name */
sprintf(buf, "/lib/lib%d.so", id);
@@
-835,6
+837,12
@@
static int load_flat_shared_library(int id, struct lib_info *libs)
if (!bprm.cred)
goto out;
if (!bprm.cred)
goto out;
+ /* We don't really care about recalculating credentials at this point
+ * as we're past the point of no return and are dealing with shared
+ * libraries.
+ */
+ bprm.cred_prepared = 1;
+
res = prepare_binprm(&bprm);
if (!IS_ERR_VALUE(res))
res = prepare_binprm(&bprm);
if (!IS_ERR_VALUE(res))