Messages in this thread | | | From | (Peter Benie) | Subject | Re: [patch-2.3.43-pre5] optimized vhangup(2) | Date | Thu, 10 Feb 2000 10:42:57 +0000 |
| |
Tigran Aivazian writes ("[patch-2.3.43-pre5] optimized vhangup(2)"): > The patch below does this to fs/open.c:sys_vhangup() > > a) removes a goto > > b) removes a local variable > > c) reduces the length of holding big kernel lock
[New code is...] > asmlinkage long sys_vhangup(void) > { > if (!capable(CAP_SYS_TTY_CONFIG)) > return -EPERM; > if (current->tty) > tty_vhangup(current->tty); > return 0; > }
Is that actually correct? If the program disassociates itself from the controlling terminal between here and the kernel lock in do_tty_hangup, will tty still be valid, and will it be owned by this process?
Please keep the lock here - this system call is very rare (typ. once per tty allocation) so deferring taking the kernel lock for a few microseconds will have negligable affect on system performance.
Peter
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |