Files
Linux/ipc
KAMEZAWA Hiroyuki 8e36709d8c [PATCH] shmdt cannot detach not-alined shm segment cleanly.
sys_shmdt() can manage shm segments which are covered by multiple vmas.  (This
can happen when a user uses mprotect() after shmat().)

This works well if shm is aligned to PAGE_SIZE, but if not, the last
segment cannot be detached.  It is because a comparison in sys_shmdt()

	(vma->vm_end - addr) < size
		addr == return address of shmat()
		size == shmsize, argments to shmget()

size should be aligned to PAGE_SIZE before being compared with vma->vm_end,
which is aligned.

Signed-off-by: KAMEZAWA Hiroyuki <[email protected]>
Cc: Manfred Spraul <[email protected]>
Acked-by: Hugh Dickins <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2006-02-10 08:13:12 -08:00
..
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2006-02-09 16:43:38 -08:00
2006-01-15 02:43:54 +01:00
2005-04-16 15:20:36 -07:00
2006-01-15 02:43:54 +01:00
2006-01-15 02:43:54 +01:00
2006-01-15 02:43:54 +01:00