From: Zhenwen Xu <helight.xu@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: viro@zeniv.linux.org.uk, eparis@redhat.com, linux-audit@redhat.com
Subject: [PATCH] this mutex_lock is miss used
Date: Sun, 19 Apr 2009 22:03:55 +0800 [thread overview]
Message-ID: <20090419140355.GA16609@helight> (raw)
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@gmail.com>
---
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
next reply other threads:[~2009-04-19 14:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-19 14:03 Zhenwen Xu [this message]
2009-04-19 15:32 ` [PATCH] this mutex_lock is miss used Al Viro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090419140355.GA16609@helight \
--to=helight.xu@gmail.com \
--cc=eparis@redhat.com \
--cc=linux-audit@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.