Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43495
b: refs/heads/master
c: dae3c5a
h: refs/heads/master
i:
  43493: 4f148e8
  43491: 0158052
  43487: 449134b
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Dec 8, 2006
1 parent 746660b commit c4f087d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ae424ae4b5bcd820ad6ee6f0b986c4e14ed4d6cf
refs/heads/master: dae3c5a0b7052ad7dd9fa78c51ecfab828c5007b
16 changes: 4 additions & 12 deletions trunk/kernel/fork.c
Original file line number Diff line number Diff line change
Expand Up @@ -1544,15 +1544,13 @@ static int unshare_namespace(unsigned long unshare_flags, struct namespace **new
}

/*
* Unsharing of sighand for tasks created with CLONE_SIGHAND is not
* supported yet
* Unsharing of sighand is not supported yet
*/
static int unshare_sighand(unsigned long unshare_flags, struct sighand_struct **new_sighp)
{
struct sighand_struct *sigh = current->sighand;

if ((unshare_flags & CLONE_SIGHAND) &&
(sigh && atomic_read(&sigh->count) > 1))
if ((unshare_flags & CLONE_SIGHAND) && atomic_read(&sigh->count) > 1)
return -EINVAL;
else
return 0;
Expand Down Expand Up @@ -1626,7 +1624,7 @@ asmlinkage long sys_unshare(unsigned long unshare_flags)
int err = 0;
struct fs_struct *fs, *new_fs = NULL;
struct namespace *ns, *new_ns = NULL;
struct sighand_struct *sigh, *new_sigh = NULL;
struct sighand_struct *new_sigh = NULL;
struct mm_struct *mm, *new_mm = NULL, *active_mm = NULL;
struct files_struct *fd, *new_fd = NULL;
struct sem_undo_list *new_ulist = NULL;
Expand Down Expand Up @@ -1671,7 +1669,7 @@ asmlinkage long sys_unshare(unsigned long unshare_flags)
}
}

if (new_fs || new_ns || new_sigh || new_mm || new_fd || new_ulist ||
if (new_fs || new_ns || new_mm || new_fd || new_ulist ||
new_uts || new_ipc) {

task_lock(current);
Expand All @@ -1693,12 +1691,6 @@ asmlinkage long sys_unshare(unsigned long unshare_flags)
new_ns = ns;
}

if (new_sigh) {
sigh = current->sighand;
rcu_assign_pointer(current->sighand, new_sigh);
new_sigh = sigh;
}

if (new_mm) {
mm = current->mm;
active_mm = current->active_mm;
Expand Down

0 comments on commit c4f087d

Please sign in to comment.