[SSI] openssi/kernel/drivers/char tty_io.c,1.13,1.14
Roger Tsang <[email protected]>
| Newsgroups | gmane.linux.cluster.ssic.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ssic-linux/openssi/kernel/drivers/char
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv16224/kernel/drivers/char
Modified Files:
Tag: OPENSSI-FC
tty_io.c
Log Message:
Bug fixes and enhancements. See ChangeLog.
Index: tty_io.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/drivers/char/tty_io.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- tty_io.c 10 Oct 2008 08:10:32 -0000 1.13
+++ tty_io.c 27 Oct 2009 03:18:30 -0000 1.14
@@ -1008,14 +1008,13 @@
#endif
int tty_pgrp = -1;
-#ifdef CONFIG_SSI
- tty = ssi_release_tty(current->signal->cttydev, current->signal->cttynode, on_exit);
-#endif
-
lock_kernel();
+#ifdef CONFIG_SSI
+ tty = ssi_release_tty(current->signal->cttydev, current->signal->cttynode, on_exit);
+ down(&tty_sem);
+#else
down(&tty_sem);
-#ifndef CONFIG_SSI
tty = current->signal->tty;
#endif
if (tty) {
@@ -2060,8 +2059,13 @@
pgvp = LOCATE_VPROC_PID(pgrp, "perm tty_open()");
if (VPOP_SETCTTY(pgvp, device, this_node,0,VCTTY_SETFGPGRP) < 0)
+#ifndef VPROC_RELEASE__REFCNT_RACE_FIX
VPROC_RELE(vp, "perm tty_open()");
+#else
+ VPROC_RELE(pgvp, "perm tty_open()");
+ SSI_ASSERT(pid == current->signal->session);
+#endif
tty->session = current->signal->session;
tty->pgrp = process_group(current);
}
@@ -2369,12 +2373,11 @@
} else
#ifdef VPROC_RELEASE__REFCNT_RACE_FIX
{
- /* Need this? */
VPROC_RELE(vp, "perm tiocsctty()");
-#endif
return -EPERM;
-#ifdef VPROC_RELEASE__REFCNT_RACE_FIX
}
+#else
+ return -EPERM;
#endif
}
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference