]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tty: hvc: replace BUG_ON() with negative return value
authorJuergen Gross <jgross@suse.com>
Mon, 29 Nov 2021 09:45:11 +0000 (10:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Dec 2021 08:27:44 +0000 (09:27 +0100)
commitbdef6fc5e725663f471ec1ff4c0350dae7b794c7
tree0b128d402b55d3d56730cf13643e462f53c8b59b
parente4e01b0e4b7fca40586639647f83eaa21a0a8203
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>
drivers/tty/hvc/hvc_xen.c