On Mon, 12 Feb 2001, Alan Cox wrote:
> 2.2.19pre10
> o Revert shm change - its unsafe (Richard Nelson)
>
> [...]
>
> 2.2.19pre3
> o Fix IPC_RMID behaviour (Christoph Rohland)
>
Ack...
First, I'm glad I wasn't hallucinating, and that the mail did indeed get
seen by someone.
Second, instead of reverting, can't we simply move those two lines up a
bit:
case IPC_RMID:
if (current->euid == shp->u.shm_perm.uid ||
current->euid == shp->u.shm_perm.cuid ||
capable(CAP_SYS_ADMIN)) {
shp->u.shm_perm.mode |= SHM_DEST;
+ /* Do not find it any more */
+ shp->shm_perm.key = IPC_PRIVATE;
if (shp->u.shm_nattch <= 0)
killseg (id);
break;
This way, we're not violating specs, programs work, *and* we're not
touching freshly kfree()d storage?
-- Rick Nelson DOS: n., A small annoying boot virus that causes random spontaneous system crashes, usually just before saving a massive project. Easily cured by UNIX. See also MS-DOS, IBM-DOS, DR-DOS. (from David Vicker's .plan)- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://vger.kernel.org/lkml/
This archive was generated by hypermail 2b29 : Thu Feb 15 2001 - 21:00:19 EST