]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
staging/speakup: Use tty_ldisc_ref() for paste kworker
authorPeter Hurley <peter@hurleysoftware.com>
Mon, 11 Jan 2016 06:40:58 +0000 (22:40 -0800)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 15 Feb 2016 20:45:24 +0000 (15:45 -0500)
commitd515d710883d98ee77819fe9b4848bfdcfd0a324
treecb0a7c5a3f74794fd35304f75b35a7bd688892bb
parent28b824966ab269de94e0ca640b7c61aedc6a83de
staging/speakup: Use tty_ldisc_ref() for paste kworker

[ Upstream commit f4f9edcf9b5289ed96113e79fa65a7bf27ecb096 ]

As the function documentation for tty_ldisc_ref_wait() notes, it is
only callable from a tty file_operations routine; otherwise there
is no guarantee the ref won't be NULL.

The key difference with the VT's paste_selection() is that is an ioctl,
where __speakup_paste_selection() is completely async kworker, kicked
off from interrupt context.

Fixes: 28a821c30688 ("Staging: speakup: Update __speakup_paste_selection()
       tty (ab)usage to match vt")
Cc: <stable@vger.kernel.org>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/staging/speakup/selection.c