Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 1 Aug 2011 22:34:01 +0400
From: Vasiliy Kulikov <>
Cc: Ingo Molnar <>,
	"Paul E. McKenney" <>,
	Manuel Lauss <>,, Richard Weinberger <>,, Marc Zyngier <>
Subject: Re: Re: initcall dependency problem (ns vs.

On Mon, Aug 01, 2011 at 11:20 -0700, Andrew Morton wrote:
> There's not really enough detail here for me to suggest a fix without
> actually doing some work.  Which ipc initialization function is being
> called to late?

The call sequence is:

static int __init ipc_init(void)

void __init shm_init (void)

void shm_init_ns(struct ipc_namespace *ns)

void ipc_init_ids(struct ipc_ids *ids)

The code triggering the oops (called from do_exit()):

void exit_shm(struct task_struct *task)

>  Which thread is using which data structures before
> which initialization function has been run?

Actually, it doesn't matter.  If ANY thread exits before init_rwsem()
then exit_shm() would use uninitialized shm_ids(ns).rw_mutex.

> Are we talking about init_ipc_ns.ids[] here?  If so, did you try
> initializing the three rwsems at compile-time?

No, good idea.  I'll do it.

IMO moving specific initializer is bad by design.  There should be a
guarantee what resources are accessible on what boot stage.  I suppose
it should be: all thread related information (including ns data) is
accessible for the moment of threads' code execution.


Vasiliy Kulikov - bringing security into open computing environments

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.