diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-01 20:51:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-01 20:51:54 -0400 |
commit | 20b4fb485227404329e41ad15588afad3df23050 (patch) | |
tree | f3e099f0ab3da8a93b447203e294d2bb22f6dc05 /fs/binfmt_aout.c | |
parent | b9394d8a657cd3c064fa432aa0905c1b58b38fe9 (diff) | |
parent | ac3e3c5b1164397656df81b9e9ab4991184d3236 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull VFS updates from Al Viro,
Misc cleanups all over the place, mainly wrt /proc interfaces (switch
create_proc_entry to proc_create(), get rid of the deprecated
create_proc_read_entry() in favor of using proc_create_data() and
seq_file etc).
7kloc removed.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (204 commits)
don't bother with deferred freeing of fdtables
proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h
proc: Make the PROC_I() and PDE() macros internal to procfs
proc: Supply a function to remove a proc entry by PDE
take cgroup_open() and cpuset_open() to fs/proc/base.c
ppc: Clean up scanlog
ppc: Clean up rtas_flash driver somewhat
hostap: proc: Use remove_proc_subtree()
drm: proc: Use remove_proc_subtree()
drm: proc: Use minor->index to label things, not PDE->name
drm: Constify drm_proc_list[]
zoran: Don't print proc_dir_entry data in debug
reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show()
proc: Supply an accessor for getting the data from a PDE's parent
airo: Use remove_proc_subtree()
rtl8192u: Don't need to save device proc dir PDE
rtl8187se: Use a dir under /proc/net/r8180/
proc: Add proc_mkdir_data()
proc: Move some bits from linux/proc_fs.h to linux/{of.h,signal.h,tty.h}
proc: Move PDE_NET() to fs/proc/proc_net.c
...
Diffstat (limited to 'fs/binfmt_aout.c')
-rw-r--r-- | fs/binfmt_aout.c | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c index 02fe378fc506..bce87694f7b0 100644 --- a/fs/binfmt_aout.c +++ b/fs/binfmt_aout.c | |||
@@ -286,15 +286,12 @@ static int load_aout_binary(struct linux_binprm * bprm) | |||
286 | return error; | 286 | return error; |
287 | } | 287 | } |
288 | 288 | ||
289 | error = bprm->file->f_op->read(bprm->file, | 289 | error = read_code(bprm->file, text_addr, pos, |
290 | (char __user *)text_addr, | 290 | ex.a_text+ex.a_data); |
291 | ex.a_text+ex.a_data, &pos); | ||
292 | if ((signed long)error < 0) { | 291 | if ((signed long)error < 0) { |
293 | send_sig(SIGKILL, current, 0); | 292 | send_sig(SIGKILL, current, 0); |
294 | return error; | 293 | return error; |
295 | } | 294 | } |
296 | |||
297 | flush_icache_range(text_addr, text_addr+ex.a_text+ex.a_data); | ||
298 | } else { | 295 | } else { |
299 | if ((ex.a_text & 0xfff || ex.a_data & 0xfff) && | 296 | if ((ex.a_text & 0xfff || ex.a_data & 0xfff) && |
300 | (N_MAGIC(ex) != NMAGIC) && printk_ratelimit()) | 297 | (N_MAGIC(ex) != NMAGIC) && printk_ratelimit()) |
@@ -310,14 +307,9 @@ static int load_aout_binary(struct linux_binprm * bprm) | |||
310 | } | 307 | } |
311 | 308 | ||
312 | if (!bprm->file->f_op->mmap||((fd_offset & ~PAGE_MASK) != 0)) { | 309 | if (!bprm->file->f_op->mmap||((fd_offset & ~PAGE_MASK) != 0)) { |
313 | loff_t pos = fd_offset; | ||
314 | vm_brk(N_TXTADDR(ex), ex.a_text+ex.a_data); | 310 | vm_brk(N_TXTADDR(ex), ex.a_text+ex.a_data); |
315 | bprm->file->f_op->read(bprm->file, | 311 | read_code(bprm->file, N_TXTADDR(ex), fd_offset, |
316 | (char __user *)N_TXTADDR(ex), | 312 | ex.a_text + ex.a_data); |
317 | ex.a_text+ex.a_data, &pos); | ||
318 | flush_icache_range((unsigned long) N_TXTADDR(ex), | ||
319 | (unsigned long) N_TXTADDR(ex) + | ||
320 | ex.a_text+ex.a_data); | ||
321 | goto beyond_if; | 313 | goto beyond_if; |
322 | } | 314 | } |
323 | 315 | ||
@@ -396,8 +388,6 @@ static int load_aout_library(struct file *file) | |||
396 | start_addr = ex.a_entry & 0xfffff000; | 388 | start_addr = ex.a_entry & 0xfffff000; |
397 | 389 | ||
398 | if ((N_TXTOFF(ex) & ~PAGE_MASK) != 0) { | 390 | if ((N_TXTOFF(ex) & ~PAGE_MASK) != 0) { |
399 | loff_t pos = N_TXTOFF(ex); | ||
400 | |||
401 | if (printk_ratelimit()) | 391 | if (printk_ratelimit()) |
402 | { | 392 | { |
403 | printk(KERN_WARNING | 393 | printk(KERN_WARNING |
@@ -406,11 +396,8 @@ static int load_aout_library(struct file *file) | |||
406 | } | 396 | } |
407 | vm_brk(start_addr, ex.a_text + ex.a_data + ex.a_bss); | 397 | vm_brk(start_addr, ex.a_text + ex.a_data + ex.a_bss); |
408 | 398 | ||
409 | file->f_op->read(file, (char __user *)start_addr, | 399 | read_code(file, start_addr, N_TXTOFF(ex), |
410 | ex.a_text + ex.a_data, &pos); | 400 | ex.a_text + ex.a_data); |
411 | flush_icache_range((unsigned long) start_addr, | ||
412 | (unsigned long) start_addr + ex.a_text + ex.a_data); | ||
413 | |||
414 | retval = 0; | 401 | retval = 0; |
415 | goto out; | 402 | goto out; |
416 | } | 403 | } |