* [PATCH 5/9] tty: Fix GPF in flush_to_ldisc(), part 2
2016-01-10 22:43 [PATCH 1/9] tty: rocket: Remove private close_wait Peter Hurley
@ 2016-01-10 22:43 ` Peter Hurley
0 siblings, 0 replies; 2+ messages in thread
From: Peter Hurley @ 2016-01-10 22:43 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Jiri Slaby, linux-kernel, linux-serial, Peter Hurley, stable
commit 9ce119f318ba ("tty: Fix GPF in flush_to_ldisc()") fixed a
GPF caused by a line discipline which does not define a receive_buf()
method.
However, the vt driver (and speakup driver also) pushes selection
data directly to the line discipline receive_buf() method via
tty_ldisc_receive_buf(). Fix the same problem in tty_ldisc_receive_buf().
Cc: <stable@vger.kernel.org>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
---
include/linux/tty.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/tty.h b/include/linux/tty.h
index dea7d54..03e4015 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -579,7 +579,7 @@ static inline int tty_ldisc_receive_buf(struct tty_ldisc *ld, unsigned char *p,
count = ld->ops->receive_buf2(ld->tty, p, f, count);
else {
count = min_t(int, count, ld->tty->receive_room);
- if (count)
+ if (count && ld->ops->receive_buf)
ld->ops->receive_buf(ld->tty, p, f, count);
}
return count;
--
2.7.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 5/9] tty: Fix GPF in flush_to_ldisc(), part 2
[not found] <1452465935-4151-1-git-send-email-peter@hurleysoftware.com>
@ 2016-01-10 22:45 ` Peter Hurley
0 siblings, 0 replies; 2+ messages in thread
From: Peter Hurley @ 2016-01-10 22:45 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Jiri Slaby, linux-serial, Peter Hurley, stable
commit 9ce119f318ba ("tty: Fix GPF in flush_to_ldisc()") fixed a
GPF caused by a line discipline which does not define a receive_buf()
method.
However, the vt driver (and speakup driver also) pushes selection
data directly to the line discipline receive_buf() method via
tty_ldisc_receive_buf(). Fix the same problem in tty_ldisc_receive_buf().
Cc: <stable@vger.kernel.org>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
---
include/linux/tty.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/tty.h b/include/linux/tty.h
index dea7d54..03e4015 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -579,7 +579,7 @@ static inline int tty_ldisc_receive_buf(struct tty_ldisc *ld, unsigned char *p,
count = ld->ops->receive_buf2(ld->tty, p, f, count);
else {
count = min_t(int, count, ld->tty->receive_room);
- if (count)
+ if (count && ld->ops->receive_buf)
ld->ops->receive_buf(ld->tty, p, f, count);
}
return count;
--
2.7.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-01-10 22:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1452465935-4151-1-git-send-email-peter@hurleysoftware.com>
2016-01-10 22:45 ` [PATCH 5/9] tty: Fix GPF in flush_to_ldisc(), part 2 Peter Hurley
2016-01-10 22:43 [PATCH 1/9] tty: rocket: Remove private close_wait Peter Hurley
2016-01-10 22:43 ` [PATCH 5/9] tty: Fix GPF in flush_to_ldisc(), part 2 Peter Hurley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).