[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52451B5D.4080908@colorfullife.com>
Date: Fri, 27 Sep 2013 07:45:01 +0200
From: Manfred Spraul <manfred@...orfullife.com>
To: Davidlohr Bueso <davidlohr@...com>
CC: Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Rik van Riel <riel@...hat.com>,
Mike Galbraith <efault@....de>, sedat.dilek@...il.com,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/4] ipc,shm: prevent race with rmid in shmat(2)
Hi Davidlohr,
On 09/16/2013 05:04 AM, Davidlohr Bueso wrote:
> This fixes a race in shmat() between finding the msq and
> actually attaching the segment, as another thread can delete shmid
> underneath us if we are preempted before acquiring the kern_ipc_perm.lock.
According the the man page, Linux supports attaching to deleted shm
segments:
http://linux.die.net/man/2/shmat
>
> On Linux, it is possible to attach a shared memory segment even if it
> is already marked to be deleted. However, POSIX.1-2001 does not
> specify this behavior and many other implementations do not support it.
>
Does your patch change that?
Unfortunately, I have neither any experience with ipc/shm nor any test
cases.
And:
As far as I can see it's not a problem if we are attaching to a deleted
segment: shm_close cleans up everything.
--
Manfred
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists