[Top] [All Lists]

Re: [PATCH] Add audit uid to netlink credentials

To: Alexey Kuznetsov <kuznet@xxxxxxxxxxxxx>
Subject: Re: [PATCH] Add audit uid to netlink credentials
From: Patrick McHardy <kaber@xxxxxxxxx>
Date: Wed, 09 Feb 2005 19:52:17 +0100
Cc: Stephen Smalley <sds@xxxxxxxxxxxxxx>, Linux Audit Discussion <linux-audit@xxxxxxxxxx>, "Serge E. Hallyn" <serue@xxxxxxxxxx>, netdev@xxxxxxxxxxx, davem@xxxxxxxxxxxxx
In-reply-to: <20050209164929.GA30007@xxxxxxxxxxxxxxx>
References: <20050204165840.GA2320@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <Pine.LNX.4.62.0502080658310.32526@xxxxxxxxxxxxxxxxxx> <1107956079.17568.42.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20050209141945.GA28864@xxxxxxxxxxxxxxx> <20050209164929.GA30007@xxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20050106 Debian/1.7.5-1
Alexey Kuznetsov wrote:


if (down_trylock(&audit_netlink_sem))

with plain down(&audit_netlink_sem);

I am sorry, this is wrong. Dequeue may happen in another process context
in any case.

Could you explain how this can happen ? From what I can see whenever data
is queued to the receive queue the input function is called immediately
through sk->sk_data_ready() -> netlink_data_ready() -> nlk->data_ready()
and processes all queued packets, except in the case you pointed out,
when audit_netlink_sem is already taken.


<Prev in Thread] Current Thread [Next in Thread>