diff options
Diffstat (limited to 'src/kernel/syscalls.c')
-rw-r--r-- | src/kernel/syscalls.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c index 1e1cd2f..3fc09fa 100644 --- a/src/kernel/syscalls.c +++ b/src/kernel/syscalls.c @@ -38,7 +38,7 @@ long _sys_fork(int flags, hid_t __user *fs_front) { SYSCALL_RETURN(-EMFILE); } - h->backend = kzalloc(sizeof *h->backend, "user fs"); + h->backend = kzalloc(sizeof *h->backend, TagUserFs); h->backend->usehcnt = 1; /* handle */ h->backend->is_user = true; h->backend->user.provhcnt = 1; @@ -68,7 +68,7 @@ hid_t _sys_open(const char __user *path, long len, int flags) { /* Doesn't check for free handles. Another thread could use up all * handles in the meantime anyways, or free some up. */ - path_buf = kmalloc(len, "path opn"); + path_buf = kmalloc(len, TagOpenPath); if (pcpy_from(proc_cur, path_buf, path, len) < (size_t)len) { goto fail; } @@ -111,7 +111,7 @@ long _sys_mount(hid_t hid, const char __user *path, long len) { if (PATH_MAX < len) SYSCALL_RETURN(-1); - path_buf = kmalloc(len, "path mnt"); + path_buf = kmalloc(len, TagMountPath); if (pcpy_from(proc_cur, path_buf, path, len) < (size_t)len) { goto fail; } @@ -138,7 +138,7 @@ long _sys_mount(hid_t hid, const char __user *path, long len) { // append to mount list // TODO move to kernel/vfs/mount.c - mount = kmalloc(sizeof *mount, "user mnt"); + mount = kmalloc(sizeof *mount, TagMountUser); mount->prev = proc_cur->mount; mount->prefix = path_buf; mount->prefix_owned = true; @@ -463,9 +463,8 @@ long _sys_execbuf(void __user *ubuf, size_t len) { SYSCALL_RETURN(-1); if (proc_cur->execbuf.buf) SYSCALL_RETURN(-1); - // TODO consider supporting nesting execbufs - char *kbuf = kmalloc(len, "execbuf"); + char *kbuf = kmalloc(len, TagExecbuf); if (pcpy_from(proc_cur, kbuf, ubuf, len) < len) { kfree(kbuf); SYSCALL_RETURN(-1); |