> On 3 May 2024, at 00:20, Alexander Bluhm <bl...@openbsd.org> wrote:
> 
> On Fri, May 03, 2024 at 12:04:02AM +0300, Vitaliy Makkoveev wrote:
>> On Thu, May 02, 2024 at 10:06:45PM +0200, kir...@korins.ky wrote:
>>>> Synopsis:  panic: unix: lock not held
>>>> Category:  kernel
>>>> Environment:
>>>     System      : OpenBSD 7.5
>>>     Details     : OpenBSD 7.5-current (GENERIC.MP) #96: Thu May  2 22:01:31 
>>> CEST 2024
>>>                      
>>> ca...@matebook.sa31-home.catap.net:/usr/src/sys/arch/amd64/compile/GENERIC.MP
>>> 
>>>     Architecture: OpenBSD.amd64
>>>     Machine     : amd64
>>>> Description:
>>>    Commit "Don't re-lock sockets in uipc_shutdown()." leads to kernel
>>>    panic on my machine.
>>>> How-To-Repeat:
>>>    Build kernel with this commit and try to boot.
>>>> Fix:
>>> 
>> 
>> Sorry, I missed this hunk.
> 
> Ah, this is in the other diff, that has not been commited yet.
> We have to reduce the number of locking flags.
> 
> OK bluhm@
> 

Yeah, I want to reduce this mess ASAP.

>> Index: sys/kern/uipc_socket2.c
>> ===================================================================
>> RCS file: /cvs/src/sys/kern/uipc_socket2.c,v
>> diff -u -p -r1.151 uipc_socket2.c
>> --- sys/kern/uipc_socket2.c  30 Apr 2024 17:59:15 -0000      1.151
>> +++ sys/kern/uipc_socket2.c  2 May 2024 20:58:43 -0000
>> @@ -334,7 +334,7 @@ socantsendmore(struct socket *so)
>> void
>> socantrcvmore(struct socket *so)
>> {
>> -    if ((so->so_rcv.sb_flags & SB_OWNLOCK) == 0)
>> +    if ((so->so_rcv.sb_flags & SB_MTXLOCK) == 0)
>>              soassertlocked(so);
>> 
>>      mtx_enter(&so->so_rcv.sb_mtx);

Reply via email to