• L
    tty: fix up atime/mtime mess, take three · b0b88565
    Linus Torvalds 提交于
    We first tried to avoid updating atime/mtime entirely (commit
    b0de59b5: "TTY: do not update atime/mtime on read/write"), and then
    limited it to only update it occasionally (commit 37b7f3c7: "TTY:
    fix atime/mtime regression"), but it turns out that this was both
    insufficient and overkill.
    
    It was insufficient because we let people attach to the shared ptmx node
    to see activity without even reading atime/mtime, and it was overkill
    because the "only once a minute" means that you can't really tell an
    idle person from an active one with 'w'.
    
    So this tries to fix the problem properly.  It marks the shared ptmx
    node as un-notifiable, and it lowers the "only once a minute" to a few
    seconds instead - still long enough that you can't time individual
    keystrokes, but short enough that you can tell whether somebody is
    active or not.
    Reported-by: NSimon Kirby <sim@hostway.ca>
    Acked-by: NJiri Slaby <jslaby@suse.cz>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: stable@vger.kernel.org
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    b0b88565
pty.c 20.7 KB