On Tue, Sep 11, 2018 at 1:21 PM David Howells <dhowells@xxxxxxxxxx> wrote: > > Andrei Vagin <avagin@xxxxxxxxx> wrote: > > > + ns->mq_mnt = NULL; > > Should I instead be allocating the namespace with kzalloc()? The ipc_namespace structure is big, so I am not sure about kzalloc(). ns->mq_mnt can be initialized in mq_init_ns, it looks better than my previous patch. diff --git a/ipc/mqueue.c b/ipc/mqueue.c index ab1fe762baa8..e05147b5ea39 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c @@ -1618,6 +1618,7 @@ int mq_init_ns(struct ipc_namespace *ns) ns->mq_msg_default = DFLT_MSG; ns->mq_msgsize_default = DFLT_MSGSIZE; + ns->mq_mnt = NULL; m = mq_create_mount(ns); if (IS_ERR(m)) return PTR_ERR(m); > > David