[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20080317175712.GB115@tv-sign.ru>
Date: Mon, 17 Mar 2008 20:57:12 +0300
From: Oleg Nesterov <oleg@...sign.ru>
To: Pavel Emelyanov <xemul@...nvz.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] Bsd_acct: using task_struct->tgid is not right in pid-namespaces
On 03/17, Pavel Emelyanov wrote:
>
> In case we're accounting from a sub-namespace,
Offtopic. Bsd-accounting is system wide. I can't understand what should
we do if multiple namespaces do acct_on().
> the tgids
> reported will not refer to the right namespace.
I think the patch is correct, but let's suppose that a sub-namespace does
accounting, and the task from the parent namespace exits. With this patch
we report ac.ac_pid == 0, which is a bit strange. But the question is,
should we see the tasks from the parent namespace at all?
Perhaps, the task shouldn't account itself if it doesn't "belong" to
acct_globals.ns ? In that case we don't need other changes to figure
out ac.ac_pid/ac_ppid.
Better yet, perhaps acct_on() should be forbidden for non-root ns?
(but the patch itself is correct afaics)
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists