From owner-freebsd-current@FreeBSD.ORG Wed Jun 12 17:58:16 2013 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 17688497 for ; Wed, 12 Jun 2013 17:58:16 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id D570516D9 for ; Wed, 12 Jun 2013 17:58:15 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 655E47300A; Wed, 12 Jun 2013 20:01:15 +0200 (CEST) Date: Wed, 12 Jun 2013 20:01:15 +0200 From: Luigi Rizzo To: current@freebsd.org Subject: copyin()/copyout() constraints ? Message-ID: <20130612180115.GA27892@onelab2.iet.unipi.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2013 17:58:16 -0000 hi, is it possible to run copyin() or copyout() in one of these cases: 1. while holding a spinlock 2. while holding a regular mutex/lock 3. while holding a read lock (on an RWLOCK or RMLOCK) 4. while holding a write lock (on an RWLOCK or RMLOCK) I suspect #1 is forbidden, but am a bit unclear for the other cases. thanks luigi