From owner-cvs-all@FreeBSD.ORG Thu Apr 5 23:19:13 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E812816A408; Thu, 5 Apr 2007 23:19:13 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id C1F2013C4B8; Thu, 5 Apr 2007 23:19:13 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l35NJDXF039655; Thu, 5 Apr 2007 23:19:13 GMT (envelope-from pjd@repoman.freebsd.org) Received: (from pjd@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l35NJDJm039654; Thu, 5 Apr 2007 23:19:13 GMT (envelope-from pjd) Message-Id: <200704052319.l35NJDJm039654@repoman.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 5 Apr 2007 23:19:13 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/kern kern_jail.c src/sys/sys jail.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Apr 2007 23:19:14 -0000 pjd 2007-04-05 23:19:13 UTC FreeBSD src repository Modified files: sys/kern kern_jail.c sys/sys jail.h Log: Implement functionality I called 'jail services'. It may be used for external modules to attach some data to jail's in-kernel structure. - Change allprison_mtx mutex to allprison_sx sx(9) lock. We will need to call external functions while holding this lock, which may want to allocate memory. Make use of the fact that this is shared-exclusive lock and use shared version when possible. - Implement the following functions: prison_service_register() - registers a service that wants to be noticed when a jail is created and destroyed prison_service_deregister() - deregisters service prison_service_data_add() - adds service-specific data to the jail structure prison_service_data_get() - takes service-specific data from the jail structure prison_service_data_del() - removes service-specific data from the jail structure Reviewed by: rwatson Revision Changes Path 1.65 +244 -27 src/sys/kern/kern_jail.c 1.29 +19 -1 src/sys/sys/jail.h