]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
FBSD: fix dumb panic when we can't pfind rxk_Listener
authorBen Kaduk <kaduk@mit.edu>
Fri, 29 Oct 2010 02:45:33 +0000 (22:45 -0400)
committerDerrick Brashear <shadow@dementia.org>
Wed, 3 Nov 2010 10:58:52 +0000 (03:58 -0700)
The process is only returned locked if the process is found.
Don't try to unlock it if it's not found.

Reviewed-on: http://gerrit.openafs.org/3186
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 832607318b9ad4ab38bb62515cdb4959cc21a656)
Change-Id: Ic4274a4a5640166669714798b909b2efb3b84cdb
Reviewed-on: http://gerrit.openafs.org/3237
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/rx/FBSD/rx_knet.c

index 187ee4c8752905b0ab3e0aa9f26b117fe802ed77..8072ba8389242a485e6ee26734415bcfc768c7a0 100644 (file)
@@ -89,9 +89,10 @@ osi_StopListener(void)
     soshutdown(rx_socket, SHUT_RDWR);
     p = pfind(rxk_ListenerPid);
     afs_warn("osi_StopListener: rxk_ListenerPid %lx\n", p);
-    if (p)
+    if (p) {
        psignal(p, SIGUSR1);
-    PROC_UNLOCK(p);
+       PROC_UNLOCK(p);
+    }
 #ifdef AFS_FBSD70_ENV
     {
       /* Avoid destroying socket until osi_NetReceive has