[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] tmem: Add ASSERT in obj_rb_insert for pool->rwlock lock.
commit 7646da32f6a863b4c9c7ec9a7226bf675921622e Author: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> AuthorDate: Fri Aug 21 10:49:22 2015 -0400 Commit: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> CommitDate: Wed Sep 2 08:47:59 2015 -0400 tmem: Add ASSERT in obj_rb_insert for pool->rwlock lock. Manipulating the obj-> structures requires us to hold the pool->rwlock lock. Lets make that obvious in this function to catch any errant users (none found, but we may in future). Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- xen/common/tmem.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/xen/common/tmem.c b/xen/common/tmem.c index ed9b975..6ea602b 100644 --- a/xen/common/tmem.c +++ b/xen/common/tmem.c @@ -916,6 +916,9 @@ static int obj_rb_insert(struct rb_root *root, struct tmem_object_root *obj) struct rb_node **new, *parent = NULL; struct tmem_object_root *this; + ASSERT(obj->pool); + ASSERT_WRITELOCK(&obj->pool->pool_rwlock); + new = &(root->rb_node); while ( *new ) { -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |