From 8833434ea80e36b176a6ff38d65794e766497505 Mon Sep 17 00:00:00 2001 From: Nadia Derbey Date: Fri, 25 Jul 2008 01:48:03 -0700 Subject: [PATCH] --- yaml --- r: 105963 b: refs/heads/master c: 983bfb7db303cfde56ae5bbf4e0f2f46e38c9576 h: refs/heads/master i: 105961: 6f75e161051f0375afd99b99a94f77ccca63b348 105959: bde4956bdba7a2714ca6eba4b50b30fe40766aa4 v: v3 --- [refs] | 2 +- trunk/ipc/util.c | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/[refs] b/[refs] index a7ffaf34d762..bcb8bafaf995 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cf481c20c476ad2c0febdace9ce23f5a4db19582 +refs/heads/master: 983bfb7db303cfde56ae5bbf4e0f2f46e38c9576 diff --git a/trunk/ipc/util.c b/trunk/ipc/util.c index 3339177b336c..0f468c34e83c 100644 --- a/trunk/ipc/util.c +++ b/trunk/ipc/util.c @@ -688,10 +688,6 @@ void ipc64_perm_to_ipc_perm (struct ipc64_perm *in, struct ipc_perm *out) * Look for an id in the ipc ids idr and lock the associated ipc object. * * The ipc object is locked on exit. - * - * This is the routine that should be called when the rw_mutex is not already - * held, i.e. idr tree not protected: it protects the idr tree in read mode - * during the idr_find(). */ struct kern_ipc_perm *ipc_lock(struct ipc_ids *ids, int id) @@ -699,18 +695,13 @@ struct kern_ipc_perm *ipc_lock(struct ipc_ids *ids, int id) struct kern_ipc_perm *out; int lid = ipcid_to_idx(id); - down_read(&ids->rw_mutex); - rcu_read_lock(); out = idr_find(&ids->ipcs_idr, lid); if (out == NULL) { rcu_read_unlock(); - up_read(&ids->rw_mutex); return ERR_PTR(-EINVAL); } - up_read(&ids->rw_mutex); - spin_lock(&out->lock); /* ipc_rmid() may have already freed the ID while ipc_lock