proc: don't throw from proc_get_set()
authorBarret Rhoden <brho@cs.berkeley.edu>
Fri, 17 May 2019 03:04:35 +0000 (23:04 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Fri, 17 May 2019 03:04:35 +0000 (23:04 -0400)
This was never actually throwing, since MEM_WAIT allocations are defined
to never return NULL.

Throwing from here was a minor issue, since profiler_setup() isn't set
up to handle throws anymore.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/src/process.c

index 4531acb..e11132a 100644 (file)
@@ -2447,8 +2447,6 @@ void proc_get_set(struct process_set *pset)
                pset->num_processes = 0;
                pset->procs = (struct proc **)
                        kzmalloc(pset->size * sizeof(struct proc *), MEM_WAIT);
-               if (!pset->procs)
-                       error(-ENOMEM, ERROR_FIXME);
 
                spin_lock(&pid_hash_lock);
                hash_for_each(pid_hash, enum_proc, pset);