From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Haertel Message-Id: <200111011857.fA1Iv9701688@ducky.net> To: 9fans@cse.psu.edu Subject: [9fans] authentication protocol question Date: Thu, 1 Nov 2001 10:57:09 -0800 Topicbox-Message-UUID: 11b12c16-eaca-11e9-9e20-41e7f4b1d025 I am puzzled by the following code in /sys/src/fs/port/auth.c. /* * the id must be in a valid range. the range is specified by a * lower bount (idoffset) and a bit vector (idvec) where a * bit set to 1 means unusable */ lock(&cp->idlock); x = a.id - cp->idoffset; bit = 1< 31 || (bit&cp->idvec)){ unlock(&cp->idlock); print("id out of range: idoff %ld idvec %lux id %ld\n", cp->idoffset, cp->idvec, a.id); return 0; } cp->idvec |= bit; From the auth(6) man page, I had the impression that the id field was supposed to be a simple sequence number. Is there a race in some client in which the order of the sequence numbers can get rearranged? What is the race?