From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zhenwen Xu Subject: [PATCH] this mutex_lock is miss used Date: Sun, 19 Apr 2009 22:03:55 +0800 Message-ID: <20090419140355.GA16609@helight> Reply-To: Zhenwen Xu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org To: linux-kernel@vger.kernel.org Cc: viro@zeniv.linux.org.uk, eparis@redhat.com, linux-audit@redhat.com List-Id: linux-audit@redhat.com This mutex_lock and mutex_unlock has no use in such way. It should be like this way: Signed-off-by: Zhenwen Xu --- 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