Skip to content

Commit 2cb91f8

Browse files
committed
lib/sdt_alloc: properly unlock stack on allocation nerror
1 parent 3cb3cf1 commit 2cb91f8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/sdt_alloc.bpf.c

+1
Original file line numberDiff line numberDiff line change
@@ -925,6 +925,7 @@ int scx_stk_fill_new_elems(struct scx_stk *stack)
925925
nr_pages = stack->nr_pages_per_alloc;
926926
nelems = (nr_pages * PAGE_SIZE) / stack->data_size;
927927
if (nelems > SCX_RING_MAX) {
928+
arena_spin_unlock(stack->lock);
928929
scx_bpf_error("new elements must fit into a single ring");
929930
return -EINVAL;
930931
}

0 commit comments

Comments
 (0)