OpenCloudOS-Kernel/drivers/video/console
Dejin Zheng fd4b824387 console: newport_con: fix an issue about leak related system resources
A call of the function do_take_over_console() can fail here.
The corresponding system resources were not released then.
Thus add a call of iounmap() and release_mem_region()
together with the check of a failure predicate. and also
add release_mem_region() on device removal.

Fixes: e86bb8acc0 ("[PATCH] VT binding: Make newport_con support binding")
Suggested-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200423164251.3349-1-zhengdejin5@gmail.com
2020-06-01 15:15:20 +02:00
..
Kconfig drm-misc-next for 5.7: 2020-02-21 05:44:40 +10:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dummycon.c dummycon: Sprinkle locking checks 2019-06-12 20:26:55 +02:00
mdacon.c mdacon: replace MDA_ADDR macro by inline function 2017-06-14 17:40:56 +02:00
newport_con.c console: newport_con: fix an issue about leak related system resources 2020-06-01 15:15:20 +02:00
sticon.c tty: vt, cleanup and document con_scroll 2016-10-27 16:37:43 +02:00
sticore.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
vgacon.c vgacon: Fix a UAF in vgacon_invert_region 2020-03-06 21:06:34 +01:00