diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2024-10-27 15:42:49 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2024-10-27 15:42:49 +0000 |
commit | 93beeed8dfc6d6c41ba8b936d9622774c13c1943 (patch) | |
tree | 2f606d09d914cd67d776399340651f12c960d765 | |
parent | 411c60c93546186636a5d1b6e37677d3f120b627 (diff) |
Remove KERNEL_LOCK() dance around km_alloc(9) & km_free(9).
Allocating VAs is done via uvm_map(9) which is safe to call without
KERNEL_LOCK() since mmap(2) & friends have been marked NOLOCK.
ok mvs@
-rw-r--r-- | sys/kern/sys_pipe.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index b96d5081dba..038da429301 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_pipe.c,v 1.146 2023/05/09 14:22:17 visa Exp $ */ +/* $OpenBSD: sys_pipe.c,v 1.147 2024/10/27 15:42:48 mpi Exp $ */ /* * Copyright (c) 1996 John S. Dyson @@ -253,9 +253,7 @@ pipe_buffer_realloc(struct pipe *cpipe, u_int size) /* buffer should be empty */ KASSERT(cpipe->pipe_buffer.cnt == 0); - KERNEL_LOCK(); buffer = km_alloc(size, &kv_any, &kp_pageable, &kd_waitok); - KERNEL_UNLOCK(); if (buffer == NULL) return (ENOMEM); @@ -767,9 +765,7 @@ pipe_buffer_free(struct pipe *cpipe) size = cpipe->pipe_buffer.size; - KERNEL_LOCK(); km_free(cpipe->pipe_buffer.buffer, size, &kv_any, &kp_pageable); - KERNEL_UNLOCK(); cpipe->pipe_buffer.buffer = NULL; |