🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
1 messages
1 total messages Started by Michael Douglass Tue, 26 Mar 1996 00:00
shared memory patch... Hole for trouble?
#6048
Author: Michael Douglass
Date: Tue, 26 Mar 1996 00:00
33 lines
1614 bytes
Ok, while playng around with the semaphores for the shared memory patch
to nnrpd, I think I might have stumbled upon a hole for the memory
locking to become fubared...  Here is the segment of code:

    if (! shm_lock()) {
	return (NULL);
    }
#ifdef GROUP_SHARED
    if (! GRPvalid) {
        shm_unlock();
        if (! GetGroupList())
            return (NULL);
        if (! shm_lock())
            return (NULL);
        if (! GRPvalid)
            return (NULL);
    }
#endif


Notice here that if the group list is not valid, you unlock and call
GetGroupList which will attempt to read in the group list.  Now, 
after that returns TRUE, you lock the shared memory again.  You then
test to make sure that the group list is valid... If it is not, you
simply return NULL...  *LEAVING THE SEMAPHORE LOCKED*...

Am I right, or am I barking up the wrong tree?  Other experts in the
area like to shed some light on this topic?

Michael Douglass
Texas Networking, Inc.

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads