From: Richard Weinberger <richard@nod.at>
To: segoon@openwall.com
Cc: serge.hallyn@canonical.com, torvalds@linux-foundation.org,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
user-mode-linux-devel@lists.sourceforge.net,
toralf.foerster@gmx.de
Subject: shm updates broke UML
Date: Mon, 1 Aug 2011 15:41:59 +0200 [thread overview]
Message-ID: <201108011541.59640.richard@nod.at> (raw)
Vasiliy,
5774ed01 (shm: handle separate PID namespaces case)
b34a6b1d (ipc: introduce shm_rmid_forced sysctl)
4c677e2e (shm: optimize locking and ipc_namespace getting)
broke UML on i386.
It crashes while starting up by SIGSEGV.
exit_shm() seems to be the evil doer.
Reverting all three patches make UML work again.
Commit 5774ed01 removed the !ns->shm_rmid_forced check, maybe this is wrong?
The attached patch cures the problem, but I'm sure it's wrong. 8)
---cut---
#13 0x08067efb in hard_handler (sig=11) at arch/um/os-Linux/sys-i386/signal.c:12
#14 <signal handler called>
#15 __list_add (sem=0x824cc98, subclass=0) at include/linux/list.h:44
#16 list_add_tail (sem=0x824cc98, subclass=0) at include/linux/list.h:76
#17 __down_write_nested (sem=0x824cc98, subclass=0) at lib/rwsem-spinlock.c:232
#18 0x081c7ba1 in __down_write (sem=0x824cc98) at lib/rwsem-spinlock.c:252
#19 0x081c74a3 in down_write (sem=0x824cc98) at kernel/rwsem.c:51
#20 0x08139913 in exit_shm (task=0x9c73b60) at ipc/shm.c:308
#21 0x08075649 in do_exit (code=0) at kernel/exit.c:983
#22 0x08081dd2 in ____call_usermodehelper (data=0x9c6bce0) at kernel/kmod.c:187
#23 0x08065c18 in run_kernel_thread (fn=0x8081ce4 <____call_usermodehelper>, arg=0x9c6bce0,
jmp_ptr=0x9c73d94)
at arch/um/os-Linux/process.c:268
#24 0x080588cb in new_thread_handler () at arch/um/kernel/process.c:153
#25 0x00000000 in ?? ()
---cut---
Not-Signed-off-by: Richard Weinberger <richard@nod.at>
---
diff --git a/ipc/shm.c b/ipc/shm.c
index 9fb044f3b..2196a0d 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -304,6 +304,9 @@ void exit_shm(struct task_struct *task)
{
struct ipc_namespace *ns = task->nsproxy->ipc_ns;
+ if(!ns->shm_rmid_forced)
+ return;
+
/* Destroy all already created segments, but not mapped yet */
down_write(&shm_ids(ns).rw_mutex);
if (&shm_ids(ns).in_use)
next reply other threads:[~2011-08-01 13:41 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-01 13:41 Richard Weinberger [this message]
2011-08-01 13:49 ` shm updates broke UML Vasiliy Kulikov
2011-08-01 14:04 ` [uml-devel] " Richard Weinberger
2011-08-01 14:04 ` Richard Weinberger
2011-08-01 16:01 ` Marc Zyngier
2011-08-01 16:01 ` Marc Zyngier
2011-08-01 17:10 ` Vasiliy Kulikov
2011-08-01 17:19 ` Marc Zyngier
2011-08-01 17:19 ` Marc Zyngier
2011-08-01 17:24 ` [uml-devel] " Vasiliy Kulikov
2011-08-01 17:24 ` Vasiliy Kulikov
2011-08-01 17:32 ` [uml-devel] " Vasiliy Kulikov
2011-08-01 17:32 ` Vasiliy Kulikov
2011-08-01 17:43 ` Marc Zyngier
2011-08-04 11:04 ` Toralf Förster
2011-08-04 11:04 ` Toralf Förster
2011-08-04 11:16 ` [uml-devel] " Vasiliy Kulikov
2011-08-04 11:16 ` Vasiliy Kulikov
2011-08-01 17:20 ` Richard Weinberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201108011541.59640.richard@nod.at \
--to=richard@nod.at \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=segoon@openwall.com \
--cc=serge.hallyn@canonical.com \
--cc=toralf.foerster@gmx.de \
--cc=torvalds@linux-foundation.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.