tty: hvc: replace BUG_ON() with negative return value
authorJuergen Gross <jgross@suse.com>
Wed, 7 Jul 2021 09:10:45 +0000 (11:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Dec 2021 08:19:10 +0000 (09:19 +0100)
commita94e4a7b77edb1ae20f41c7c53677a9c6cee1fd8
treea763d6213a22928668c7c2b15e8121de06765718
parent1c5f722a8fdf19d383112fb701525e1b6870d8ca
tty: hvc: replace BUG_ON() with negative return value

commit e679004dec37566f658a255157d3aed9d762a2b7 upstream.

Xen frontends shouldn't BUG() in case of illegal data received from
their backends. So replace the BUG_ON()s when reading illegal data from
the ring page with negative return values.

Reviewed-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/20210707091045.460-1-jgross@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/hvc/hvc_xen.c