pager_get_path: Append \0 to path
Change-Id: Iaabd89a649bb20b37b35cd345da0f468fd5dd0b5
This commit is contained in:
@@ -1214,7 +1214,7 @@ static int pager_get_path(struct file *file, char *path) {
|
||||
|
||||
fullpath = d_path(&file->f_path, pathbuf, PATH_MAX);
|
||||
if (!IS_ERR(fullpath)) {
|
||||
memcpy(path, fullpath, strlen(fullpath));
|
||||
memcpy(path, fullpath, strlen(fullpath) + 1);
|
||||
}
|
||||
else {
|
||||
path[0] = 0;
|
||||
|
||||
@@ -122,6 +122,8 @@ int devobj_create(int fd, size_t len, off_t off, struct memobj **objp, int *maxp
|
||||
ihk_mc_syscall_arg4(&ctx) = virt_to_phys(&result);
|
||||
ihk_mc_syscall_arg5(&ctx) = prot | populate_flags;
|
||||
|
||||
memset(&result, 0, sizeof(result));
|
||||
|
||||
error = syscall_generic_forwarding(__NR_mmap, &ctx);
|
||||
if (error) {
|
||||
kprintf("%s: error: fd: %d, len: %lu, off: %lu map failed.\n",
|
||||
|
||||
Reference in New Issue
Block a user