Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/rw/uml

Pull UML fixes from Richard Weinberger:
 "Assorted fixes for UML"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
  um: Memory corruption on startup
  um: Missing pipe handling
  uml: Simplify tempdir logic.
  • Loading branch information
Linus Torvalds committed Apr 21, 2014
2 parents 9ac0367 + 0565103 commit c089b22
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 297 deletions.
1 change: 1 addition & 0 deletions arch/um/include/shared/os.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ extern int os_ioctl_generic(int fd, unsigned int cmd, unsigned long arg);
extern int os_get_ifname(int fd, char *namebuf);
extern int os_set_slip(int fd);
extern int os_mode_fd(int fd, int mode);
extern int os_fsync_file(int fd);

extern int os_seek_file(int fd, unsigned long long offset);
extern int os_open_file(const char *file, struct openflags flags, int mode);
Expand Down
1 change: 1 addition & 0 deletions arch/um/kernel/physmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ void __init setup_physmem(unsigned long start, unsigned long reserve_end,
*/
os_seek_file(physmem_fd, __pa(&__syscall_stub_start));
os_write_file(physmem_fd, &__syscall_stub_start, PAGE_SIZE);
os_fsync_file(physmem_fd);

bootmap_size = init_bootmem(pfn, pfn + delta);
free_bootmem(__pa(reserve_end) + bootmap_size,
Expand Down
6 changes: 6 additions & 0 deletions arch/um/os-Linux/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,12 @@ void os_close_file(int fd)
{
close(fd);
}
int os_fsync_file(int fd)
{
if (fsync(fd) < 0)
return -errno;
return 0;
}

int os_seek_file(int fd, unsigned long long offset)
{
Expand Down
1 change: 1 addition & 0 deletions arch/um/os-Linux/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ int __init main(int argc, char **argv, char **envp)
#endif

do_uml_initcalls();
change_sig(SIGPIPE, 0);
ret = linux_main(argc, argv);

/*
Expand Down
Loading

0 comments on commit c089b22

Please sign in to comment.