Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de2a84f2 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds
Browse files

[PATCH] solaris emulation: incorrect tty locking



[akpm@osdl.org: build fix]
[akpm@osdl.org: warning fix]
Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 074a5dde
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -11,6 +11,7 @@
#include <linux/limits.h>
#include <linux/limits.h>
#include <linux/mm.h>
#include <linux/mm.h>
#include <linux/smp.h>
#include <linux/smp.h>
#include <linux/tty.h>
#include <linux/mman.h>
#include <linux/mman.h>
#include <linux/file.h>
#include <linux/file.h>
#include <linux/timex.h>
#include <linux/timex.h>
@@ -422,7 +423,9 @@ asmlinkage int solaris_procids(int cmd, s32 pid, s32 pgid)
			   Solaris setpgrp and setsid? */
			   Solaris setpgrp and setsid? */
			ret = sys_setpgid(0, 0);
			ret = sys_setpgid(0, 0);
			if (ret) return ret;
			if (ret) return ret;
			mutex_lock(&tty_mutex);
			current->signal->tty = NULL;
			current->signal->tty = NULL;
			mutex_unlock(&tty_mutex);
			return process_group(current);
			return process_group(current);
		}
		}
	case 2: /* getsid */
	case 2: /* getsid */
+1 −0
Original line number Original line Diff line number Diff line
@@ -129,6 +129,7 @@ LIST_HEAD(tty_drivers); /* linked list of tty drivers */
/* Semaphore to protect creating and releasing a tty. This is shared with
/* Semaphore to protect creating and releasing a tty. This is shared with
   vt.c for deeply disgusting hack reasons */
   vt.c for deeply disgusting hack reasons */
DEFINE_MUTEX(tty_mutex);
DEFINE_MUTEX(tty_mutex);
EXPORT_SYMBOL(tty_mutex);


#ifdef CONFIG_UNIX98_PTYS
#ifdef CONFIG_UNIX98_PTYS
extern struct tty_driver *ptm_driver;	/* Unix98 pty masters; for /dev/ptmx */
extern struct tty_driver *ptm_driver;	/* Unix98 pty masters; for /dev/ptmx */