[SSI-devel] Re: [ ssic-linux-Bugs-986537 ] semundo doesn't happen upon nodedown
Brought to you by:
brucewalker,
rogertsang
From: Andreas <ro...@co...> - 2004-07-15 14:28:11
|
Keerthi Bhushan K N wrote: > Hi Andreas, > > Andreas wrote: > >>> Hello >>> >>> I am using the new sources out of the CVS an now there is a problem >>> with the semaphores. It is possible to create a semaphore. >>> >>> semget (4000,1,IPC_CREAT | IPC_EXCL | U_R | U_W) >>> >>> returns a valid id. The second call tells that it allready exists, >>> what is right But every call of >>> >>> semget (4000,0,0) >>> >>> from another node as the one where the semaphore is created returns >>> EINVAL (22). >> >> >> >> In line 271 of sem.c is tested, if nsems is 0. But I think that should >> be changed? >> >> The test should be >> >> >> if (!nsems && semflg) { >> retval = -EINVAL; >> goto out_up; >> } >> >> >> Isn't that correct? If you do not give any flags and set the number of >> the semaphores allthough to zero you intend to just open the >> semaphore. In nearly every samplecode semaphores are opened with >> nsems=0 and no flags. And as it works if the semaphore node is the >> lokal node I think it should be changed. > > > > This is a bug which I have fixed. Please try out the latest sources. > Basically we do the (correct) check in sys_msgget() before calling > ssi_msgget(). So the piece of code u have mentioned above (sem.c:271) is > actually redundant. Thank you for you answere. I am using the code out of the stable branch now and it works fine Andreas > > Keerthi > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click |