[PATCH] this mutex_lock is miss used

From: Zhenwen Xu
Date: Sun Apr 19 2009 - 10:05:44 EST



This mutex_lock and mutex_unlock has no use in such way.
It should be like this way:

Signed-off-by: Zhenwen Xu <helight.xu@xxxxxxxxx>
---
kernel/audit.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/kernel/audit.c b/kernel/audit.c
index 9442c35..3176ffa 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -485,12 +485,11 @@ int audit_send_list(void *_dest)

/* wait for parent to finish and send an ACK */
mutex_lock(&audit_cmd_mutex);
- mutex_unlock(&audit_cmd_mutex);
-
while ((skb = __skb_dequeue(&dest->q)) != NULL)
netlink_unicast(audit_sock, skb, pid, 0);

kfree(dest);
+ mutex_unlock(&audit_cmd_mutex);

return 0;
}
--
1.5.6.5

--
---------------------------------
Zhenwen Xu - Open and Free
Home Page: http://zhwen.org
My Studio: http://dim4.cn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/