]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
When the adist_free list is empty and we lose connection to the receiver we
authorpjd <pjd@FreeBSD.org>
Thu, 4 Oct 2018 05:54:57 +0000 (05:54 +0000)
committerpjd <pjd@FreeBSD.org>
Thu, 4 Oct 2018 05:54:57 +0000 (05:54 +0000)
commitdd4a41d654cd7dd729a50a795e9ae42a2b2c1ab7
treeebc685d3816d113b62aea4ec5e5589312d176615
parent55f081d3635aec555694558366c6ccc76daf34ee
When the adist_free list is empty and we lose connection to the receiver we
move all elements from the adist_send and adist_recv lists back onto the
adist_free list, but we don't wake consumers waitings for the adist_free list
to become non-empty. This can lead to the sender process stopping audit trail
files distribution and waiting forever.

Fix the problem by adding the missing wakeup.

While here slow down spinning on CPU in case of a short race in
sender_disconnect() and add an explaination when it can occur.

PR: 201953
Reported by: peter
Approved by: re (kib)
contrib/openbsm/bin/auditdistd/auditdistd.h
contrib/openbsm/bin/auditdistd/sender.c