From owner-cvs-src-old@FreeBSD.ORG Mon Jun 28 18:13:19 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D595C1065670 for ; Mon, 28 Jun 2010 18:13:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C55248FC16 for ; Mon, 28 Jun 2010 18:13:19 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o5SIDJOw061355 for ; Mon, 28 Jun 2010 18:13:19 GMT (envelope-from kib@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o5SIDJSC061354 for cvs-src-old@freebsd.org; Mon, 28 Jun 2010 18:13:19 GMT (envelope-from kib@repoman.freebsd.org) Message-Id: <201006281813.o5SIDJSC061354@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to kib@repoman.freebsd.org using -f From: Konstantin Belousov Date: Mon, 28 Jun 2010 18:12:42 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern sysv_shm.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 18:13:19 -0000 kib 2010-06-28 18:12:42 UTC FreeBSD src repository Modified files: sys/kern sysv_shm.c Log: SVN rev 209580 on 2010-06-28 18:12:42Z by kib Despite system call deregistration drains the threads executing System V shm syscalls, and initial check for the number of allocated segments in the module deinitialization code, the following might happen: after the check for active segment, while waiting for threads to leave some other syscall, shmget(2) is called. Then, we can end up with the shared segment that cannot be detached since sysvshm module is unloaded. Prevent the leak by rechecking and disclaiming a reference to the vm object owned by sysvshm module, that might have grown during the drain. Tested by: pho Reviewed by: jhb MFC after: 1 month Revision Changes Path 1.129 +9 -1 src/sys/kern/sysv_shm.c