summaryrefslogtreecommitdiff
path: root/src/kernel/syscalls.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/syscalls.c')
-rw-r--r--src/kernel/syscalls.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c
index 5cec6c4..2a9a7b5 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);
+ h->backend = kzalloc(sizeof *h->backend, "user fs");
h->backend->is_user = true;
h->backend->provhcnt = 1; /* child */
h->backend->usehcnt = 1; /* handle */
@@ -67,7 +67,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_buf = kmalloc(len, "path opn");
if (pcpy_from(proc_cur, path_buf, path, len) < (size_t)len) {
goto fail;
}
@@ -110,7 +110,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_buf = kmalloc(len, "path mnt");
if (pcpy_from(proc_cur, path_buf, path, len) < (size_t)len) {
goto fail;
}
@@ -135,7 +135,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);
+ mount = kmalloc(sizeof *mount, "user mnt");
mount->prev = proc_cur->mount;
mount->prefix = path_buf;
mount->prefix_owned = true;
@@ -458,7 +458,7 @@ long _sys_execbuf(void __user *ubuf, size_t len) {
SYSCALL_RETURN(-1);
// TODO consider supporting nesting execbufs
- char *kbuf = kmalloc(len);
+ char *kbuf = kmalloc(len, "execbuf");
if (pcpy_from(proc_cur, kbuf, ubuf, len) < len) {
kfree(kbuf);
SYSCALL_RETURN(-1);