projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
c26405f
)
tty: tty_buffer: warn if losing flags in __tty_insert_flip_string_flags()
author
Jiri Slaby (SUSE)
<jirislaby@kernel.org>
Wed, 16 Aug 2023 10:55:24 +0000
(12:55 +0200)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Tue, 22 Aug 2023 12:58:15 +0000
(14:58 +0200)
And add a WARN_ON_ONCE(need_flags) to make sure we are not losing flags
in __tty_insert_flip_string_flags().
Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link:
https://lore.kernel.org/r/20230816105530.3335-5-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_buffer.c
patch
|
blob
|
history
diff --git
a/drivers/tty/tty_buffer.c
b/drivers/tty/tty_buffer.c
index
94a88dc
..
c101b4a
100644
(file)
--- a/
drivers/tty/tty_buffer.c
+++ b/
drivers/tty/tty_buffer.c
@@
-325,6
+325,9
@@
int __tty_insert_flip_string_flags(struct tty_port *port, const u8 *chars,
flags += space;
} else if (tb->flags) {
memset(flag_buf_ptr(tb, tb->used), flags[0], space);
+ } else {
+ /* tb->flags should be available once requested */
+ WARN_ON_ONCE(need_flags);
}
tb->used += space;