this mutex_lock is miss used
PATCH 1/1 this mutex_lock is miss used
This mutex_lock and mutex_unlock has no use in such way. It should be like this way:
Signed-off-by Zhenwen Xu <[email protected]>
--- kernel/audit.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
kernel/audit.c +1 -2
@@ -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 ; }
Signature · 7 lines
1.5.6.5 -- --------------------------------- Zhenwen Xu - Open and Free Home Page: http://zhwen.org My Studio: http://dim4.cn
Quoted 2 lines · Zhenwen Xu
This
mutex_lockandmutex_unlockhas no use in such way.
Incorrect. They delay sending response until we are out of audit_receive().
Quoted 1 line
It should be like this way:
No, it should not. In particular, it should *NOT* be held while sending these packets.