]> git.baikalelectronics.ru Git - kernel.git/commit
Commit 0bae1a191e82 ("tty: implement write_iter") converted the tty
authorSami Tolvanen <samitolvanen@google.com>
Mon, 25 Jan 2021 19:09:25 +0000 (11:09 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 25 Jan 2021 20:08:07 +0000 (12:08 -0800)
commit68cbf08d6fce5816718d58287698c21e38e46cf8
treed9cd1e0696432dde2a714f2abbe36685b2b78c72
parentd78faef1012f24d8ef4346f4bd3552923d1f7c9a
Commit 0bae1a191e82 ("tty: implement write_iter") converted the tty
layer to use write_iter. Fix the redirected_tty_write declaration
also in n_tty and change the comparisons to use write_iter instead of
write.

[ Also moved the declaration of redirected_tty_write() to the proper
  location in a header file. The reason for the bug was the bogus extern
  declaration in n_tty.c silently not matching the changed definition in
  tty_io.c, and because it wasn't in a shared header file, there was no
  cross-checking of the declaration.

  Sami noticed because Clang's Control Flow Integrity checking ended up
  incidentally noticing the inconsistent declaration.    - Linus ]

Fixes: 0bae1a191e82 ("tty: implement write_iter")
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/tty/n_tty.c
drivers/tty/tty_io.c
include/linux/tty.h