From: Jeremy Allison Date: Thu, 3 Sep 2009 14:38:21 +0000 (-0700) Subject: Another part of the fix for bug 6651 - smbd SIGSEGV when breaking oplocks. X-Git-Tag: talloc-2.0.0~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c97698e762b1ea8d7133f04ae822225676a6f135;p=thirdparty%2Fsamba.git Another part of the fix for bug 6651 - smbd SIGSEGV when breaking oplocks. SA_INFO_QUEUE_COUNT *MUST* be a power of 2, in order for the ring buffer wrap to work correctly at the 32 bit boundary. Thanks to Petr Vandrovec for this. --- diff --git a/lib/tevent/tevent_signal.c b/lib/tevent/tevent_signal.c index b329f8c1e72..ef9c0cf2887 100644 --- a/lib/tevent/tevent_signal.c +++ b/lib/tevent/tevent_signal.c @@ -32,8 +32,12 @@ #define NUM_SIGNALS 64 -/* maximum number of SA_SIGINFO signals to hold in the queue */ -#define SA_INFO_QUEUE_COUNT 100 +/* maximum number of SA_SIGINFO signals to hold in the queue. + NB. This *MUST* be a power of 2, in order for the ring buffer + wrap to work correctly. Thanks to Petr Vandrovec + for this. */ + +#define SA_INFO_QUEUE_COUNT 64 struct sigcounter { uint32_t count;