lkml.org 
[lkml]   [1999]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch] SysV SHM is broken on SMP in 2.3.32
"Stephen C. Tweedie" wrote:
>
> ipc_addid is where the breakage is. It selects a new ID to use, then
> does an ipc_lock() on that ID, and then installs the new ID. However,
> ipc_lock() aborts because the new ID is not yet installed, and ipc_addid
> silently ignores the error.

Ops. I first wrote ipc_addid(), and then I had to change the semantics
of ipc_lock(). Sorry


> if(ids->seq > ids->seq_max)
> ids->seq = 0;
>
> - ipc_lock(ids,id);
> ids->entries[id].p = new;
> + if (!ipc_lock(ids,id))
> + BUG();
> return id;
> }
>
The patch is wrong: now there is a window where a second cpu could see
an partially initialized structure. I'll post a patch ASAP.

--
Manfred

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.038 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site