Quoting Eric W. Biederman (ebiederm@xmission.com):Eric, does the following patch correctly interpret your recommendation? Pavel does it make sense to you? thanks, -serge From 9c85fb3cb80cea1d888c3c253a9fb6e9bc173649 Mon Sep 17 00:00:00 2001 From: Serge E. Hallyn <serue@us.ibm.com> Date: Thu, 3 Apr 2008 12:43:23 -0700 Subject: [PATCH 1/1] ipc namespaces: fix svsem unsharing issue Refuse to unshare an ipcns if the semundo is shared and we are not requesting a new SYSVSEM Signed-off-by: Serge E. Hallyn <serue@us.ibm.com> --- ipc/namespace.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/ipc/namespace.c b/ipc/namespace.c index 9171d94..9044505 100644 --- a/ipc/namespace.c +++ b/ipc/namespace.c @@ -48,6 +48,16 @@ struct ipc_namespace *copy_ipcs(unsigned long flags, struct ipc_namespace *ns) if (!(flags & CLONE_NEWIPC)) return ns; + if (!(flags & CLONE_SYSVSEM)) { + if (!current->sysvsem.undo_list) + goto ok; + if (atomic_read(¤t->sysvsem.undo_list->refcnt) == 1) + goto ok; + put_ipc_ns(ns); + return ERR_PTR(-EINVAL); + } + +ok: new_ns = clone_ipc_ns(ns); put_ipc_ns(ns); -- 1.5.3.6 --
| Linus Torvalds | Linux 2.6.27-rc5 |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Eric Paris | [RFC 0/5] [TALPA] Intro to a linux interface for on access scanning |
git: | |
| Johannes Sixt | [PATCH 02/40] Compile some programs only conditionally. |
| Linus Torvalds | [PATCH 0/6] Initial subproject support (RFC?) |
| Jon Smirl | Figured out how to get Mozilla into git |
| Linus Torvalds | irc usage.. |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Richard Stallman | Real men don't attack straw men |
| Marcos Laufer | dmesg IBM x3650 OpenBSD 4.3 |
| Tony Bruguier | [newbie] ssh and sftp timing out |
| Jim Winstead Jr. | Re: Root Disk/Book Disk Compatibility |
| Doug Evans | Re: Stabilizing Linux |
| Joseph R. Pannon | Re: Ctrl-Alt-Del |
| Pat Rankin | Re: Nethack + Linux, Please Help! |
| Problem in Inserting a module | 47 minutes ago | Linux kernel |
| usb mic not detected | 1 hour ago | Applications and Utilities |
| Treason Uncloaked | 6 hours ago | Linux kernel |
| Shared swap partition | 17 hours ago | Linux general |
| high memory | 2 days ago | Linux kernel |
| semaphore access speed | 2 days ago | Applications and Utilities |
| the kernel how to power off the machine | 2 days ago | Linux kernel |
| Easter Eggs in windows XP | 2 days ago | Windows |
| Root password | 2 days ago | Linux general |
| Where/when DNOTIFY is used? | 2 days ago | Linux kernel |
