WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] remove redundant rcu_read_unlock

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] remove redundant rcu_read_unlock
From: "Mike D. Day" <ncmike@xxxxxxxxxx>
Date: Wed, 28 Mar 2007 15:06:26 -0400
Delivery-date: Wed, 28 Mar 2007 12:05:25 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM Linux Technology Center
Reply-to: ncmike@xxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.13 (2006-08-11)
In the function rcu_lock_domain_by_id there is a call to
rcu_read_unlock just prior to returning. However, the intent is that
the rcu reader retain the read lock after the call has returned. This
can be verified by auditing the callers of this routine, which each
explicitly call rcu_unlock_domain, which in turn calls
rcu_read_unlock.

--
Remove redundant call to rcu_read_unlock.

signed-off-by: Mike D. Day <ncmike@xxxxxxxxxx>

diff -r 6ee683d1b61f xen/common/domain.c
--- a/xen/common/domain.c       Wed Mar 28 15:31:17 2007 +0100
+++ b/xen/common/domain.c       Wed Mar 28 14:43:13 2007 -0400
@@ -252,8 +252,6 @@ struct domain *rcu_lock_domain_by_id(dom
            return d;
    }

-    rcu_read_unlock(&domlist_read_lock);
-
    return NULL;
}



--
Mike D. Day
IBM LTC
Cell: 919 412-3900
Sametime: ncmike@xxxxxxxxxx AIM: ncmikeday  Yahoo: ultra.runner
PGP key: http://www.ncultra.org/ncmike/pubkey.asc

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>