]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
locks: fix a long standing bug for primitives with kdtrace but without spinning
authorMateusz Guzik <mjg@FreeBSD.org>
Thu, 23 Jul 2020 17:26:53 +0000 (17:26 +0000)
committerMateusz Guzik <mjg@FreeBSD.org>
Thu, 23 Jul 2020 17:26:53 +0000 (17:26 +0000)
commitc795344ff71ff37ee942ac1ace3705a58a9d9ad8
tree9e68af145b3af63758a4d41639dc738e81da2690
parente605dcc939848312a201b4aa53bd7bb67d862b18
locks: fix a long standing bug for primitives with kdtrace but without spinning

In such a case the second argument to lock_delay_arg_init was NULL which was
immediately causing a null pointer deref.

Since the sructure is only used for spin count, provide a dedicate routine
initializing it.

Reported by: andrew
sys/kern/kern_mutex.c
sys/kern/kern_rwlock.c
sys/kern/kern_sx.c
sys/sys/lock.h