diff options
Diffstat (limited to 'fs/binfmt_misc.c')
-rw-r--r-- | fs/binfmt_misc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index f4718098ac31..ce7181ea60fa 100644 --- a/fs/binfmt_misc.c +++ b/fs/binfmt_misc.c | |||
@@ -218,12 +218,15 @@ static int load_misc_binary(struct linux_binprm *bprm) | |||
218 | 218 | ||
219 | bprm->file = interp_file; | 219 | bprm->file = interp_file; |
220 | if (fmt->flags & MISC_FMT_CREDENTIALS) { | 220 | if (fmt->flags & MISC_FMT_CREDENTIALS) { |
221 | loff_t pos = 0; | ||
222 | |||
221 | /* | 223 | /* |
222 | * No need to call prepare_binprm(), it's already been | 224 | * No need to call prepare_binprm(), it's already been |
223 | * done. bprm->buf is stale, update from interp_file. | 225 | * done. bprm->buf is stale, update from interp_file. |
224 | */ | 226 | */ |
225 | memset(bprm->buf, 0, BINPRM_BUF_SIZE); | 227 | memset(bprm->buf, 0, BINPRM_BUF_SIZE); |
226 | retval = kernel_read(bprm->file, 0, bprm->buf, BINPRM_BUF_SIZE); | 228 | retval = kernel_read(bprm->file, bprm->buf, BINPRM_BUF_SIZE, |
229 | &pos); | ||
227 | } else | 230 | } else |
228 | retval = prepare_binprm(bprm); | 231 | retval = prepare_binprm(bprm); |
229 | 232 | ||