mirror of
https://github.com/drasko/codezero.git
synced 2026-04-18 01:39:05 +02:00
Forgotten to add vma to file reference in do_mmap(). This adds that.
This commit is contained in:
@@ -473,6 +473,7 @@ int mmap_address_validate(unsigned long map_address, unsigned int vm_flags)
|
|||||||
} else
|
} else
|
||||||
BUG();
|
BUG();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Maps the given file with given flags at the given page offset to the given
|
* Maps the given file with given flags at the given page offset to the given
|
||||||
* task's address space at the specified virtual memory address and length.
|
* task's address space at the specified virtual memory address and length.
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ int init_boot_files(struct initdata *initdata)
|
|||||||
list_add(&boot_file->vm_obj.list, &vm_object_list);
|
list_add(&boot_file->vm_obj.list, &vm_object_list);
|
||||||
|
|
||||||
/* Add the file to initdata's bootfile list */
|
/* Add the file to initdata's bootfile list */
|
||||||
list_add(&boot_file->list, &initdata->boot_file_list);
|
list_add_tail(&boot_file->list, &initdata->boot_file_list);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -307,31 +307,38 @@ error:
|
|||||||
BUG();
|
BUG();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct vm_file *initdata_next_bootfile(struct initdata *initdata)
|
||||||
|
{
|
||||||
|
struct vm_file *file, *n;
|
||||||
|
list_for_each_entry_safe(file, n, &initdata->boot_file_list,
|
||||||
|
list) {
|
||||||
|
list_del(&file->list);
|
||||||
|
return file;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reads boot files from init data, determines their task ids if they
|
* Reads boot files from init data, determines their task ids if they
|
||||||
* match with particular servers, and starts the tasks.
|
* match with particular servers, and starts the tasks.
|
||||||
*/
|
*/
|
||||||
int start_boot_tasks(struct initdata *initdata)
|
int start_boot_tasks(struct initdata *initdata)
|
||||||
{
|
{
|
||||||
struct vm_file *file, *n;
|
struct vm_file *file;
|
||||||
struct svc_image *img;
|
struct svc_image *img;
|
||||||
struct task_ids ids;
|
struct task_ids ids;
|
||||||
int total = 0;
|
int total = 0;
|
||||||
|
|
||||||
INIT_LIST_HEAD(&tcb_head.list);
|
INIT_LIST_HEAD(&tcb_head.list);
|
||||||
do {
|
do {
|
||||||
file = 0;
|
file = initdata_next_bootfile(initdata);
|
||||||
list_for_each_entry_safe(file, n, &initdata->boot_file_list,
|
|
||||||
list) {
|
|
||||||
list_del(&file->list);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (file) {
|
if (file) {
|
||||||
BUG_ON(file->type != VM_FILE_BOOTFILE);
|
BUG_ON(file->type != VM_FILE_BOOTFILE);
|
||||||
img = file->priv_data;
|
img = file->priv_data;
|
||||||
if (!strcmp(img->name, __PAGERNAME__))
|
if (!strcmp(img->name, __PAGERNAME__)) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
/* Set up task ids */
|
/* Set up task ids */
|
||||||
if (!strcmp(img->name, __VFSNAME__)) {
|
if (!strcmp(img->name, __VFSNAME__)) {
|
||||||
ids.tid = VFS_TID;
|
ids.tid = VFS_TID;
|
||||||
|
|||||||
Reference in New Issue
Block a user