From: Daniel De Graaf Subject: gnttab_setup_table attempting copy_from_guest in atomic context Date: Wed, 01 Dec 2010 17:48:32 -0500 Message-ID: <4CF6D0C0.2060402@tycho.nsa.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel , Keir Fraser List-Id: xen-devel@lists.xenproject.org do_grant_table_op takes domain_lock(d), and then calls gnttab_setup_table with the lock held. Since changeset 22402:7d2fdc083c9c, this will cause the copy to fail with a rather misleading message: (XEN) grant_table.c:1315:d1 Fault while reading gnttab_query_size_t. This causes grants between HVM guests to fail. >From looking at the code, it appears that at least some of the functions within do_grant_table_op do not need to hold domain_lock. Is there a reason to hold domain_lock when manipulating the grant table? Most of the critical operations already appear to be protected by the grant table lock, so it may be safe to completely remove the lock_domain calls in this function. -- Daniel De Graaf National Security Agency