diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2020-05-28 07:17:51 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2020-05-28 07:17:51 +0000 |
commit | b7762f892ec941fe975a9c62b57a256a59f175fb (patch) | |
tree | 4b2cd9adafa44762966ccb3c966fe32a49bd0a72 /sys | |
parent | 8a040f09fe7cce00d1cf98339d7c9bc01bece60e (diff) |
File allocation in socket(2) & socketpair(2) no longer need the KERNEL_LOCK().
Bring the two syscalls in sync with recent MP changes in the file layer.
Inconsistency pointed by haesbaert@.
ok anton@, visa@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/uipc_syscalls.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index e3661b5f16c..b898bab546e 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_syscalls.c,v 1.184 2020/01/15 13:17:35 mpi Exp $ */ +/* $OpenBSD: uipc_syscalls.c,v 1.185 2020/05/28 07:17:50 mpi Exp $ */ /* $NetBSD: uipc_syscalls.c,v 1.19 1996/02/09 19:00:48 christos Exp $ */ /* @@ -97,7 +97,6 @@ sys_socket(struct proc *p, void *v, register_t *retval) if (error) return (error); - KERNEL_LOCK(); fdplock(fdp); error = falloc(p, &fp, &fd); if (error) { @@ -114,7 +113,6 @@ sys_socket(struct proc *p, void *v, register_t *retval) FRELE(fp, p); *retval = fd; } - KERNEL_UNLOCK(); return (error); } @@ -450,7 +448,6 @@ sys_socketpair(struct proc *p, void *v, register_t *retval) if (error != 0) goto free2; } - KERNEL_LOCK(); fdplock(fdp); if ((error = falloc(p, &fp1, &sv[0])) != 0) goto free3; @@ -475,7 +472,6 @@ sys_socketpair(struct proc *p, void *v, register_t *retval) fdpunlock(fdp); FRELE(fp1, p); FRELE(fp2, p); - KERNEL_UNLOCK(); return (0); } fdremove(fdp, sv[1]); @@ -487,7 +483,6 @@ free4: so1 = NULL; free3: fdpunlock(fdp); - KERNEL_UNLOCK(); free2: if (so2 != NULL) (void)soclose(so2, 0); |