On Wed, Oct 04, 2023 at 08:29:18PM +0000, Andrew Doran wrote:
> Module Name:  src
> Committed By: ad
> Date:         Wed Oct  4 20:29:18 UTC 2023
> 
> Modified Files:
>       src/sys/kern: kern_condvar.c kern_exec.c kern_exit.c kern_sig.c
>           kern_sleepq.c kern_synch.c kern_timeout.c kern_turnstile.c
>           sys_lwp.c sys_select.c
>       src/sys/rump/librump/rumpkern: lwproc.c sleepq.c
>       src/sys/sys: lwp.h sleepq.h
> 
> Log Message:
> Eliminate l->l_biglocks.  Originally I think it had a use but these days a
> local variable will do.

This breaks the build:

../../../../kern/kern_synch.c: In function 'kpause':
../../../../kern/kern_synch.c:257:10: error: 'nlocks' may be used uninitialized 
in this function [-Werror=maybe-uninitialized]
  257 |  error = sleepq_block(timo, intr, &kpause_syncobj, nlocks);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors


and it looks like gcc is totally correct here: KERNEL_UNLOCK_ALL()
does not set nlocks but KERNEL_LOCK() later KASSERTS it is > 0.

Martin

Reply via email to