lkml.org 
[lkml]   [2000]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch-2.3.43-pre5] optimized vhangup(2)
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.210 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site