linux-brain/drivers/auxdisplay
Miguel Ojeda 69da13295e auxdisplay: ht16k33: fix potential user-after-free on module unload
[ Upstream commit 69ef9bc547 ]

On module unload/remove, we need to ensure that work does not run
after we have freed resources. Concretely, cancel_delayed_work()
may return while the callback function is still running.

From kernel/workqueue.c:

    The work callback function may still be running on return,
    unless it returns true and the work doesn't re-arm itself.
    Explicitly flush or use cancel_delayed_work_sync() to wait on it.

Link: https://lore.kernel.org/lkml/20190204220952.30761-1-TheSven73@googlemail.com/
Reported-by: Sven Van Asbroeck <thesven73@gmail.com>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Sven Van Asbroeck <TheSven73@gmail.com>
Acked-by: Robin van der Gracht <robin@protonic.nl>
Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-03-23 14:35:13 +01:00
..
arm-charlcd.c auxdisplay: Move arm-charlcd.c to drivers/auxdisplay folder 2017-04-08 17:48:20 +02:00
cfag12864b.c Fix common misspellings 2011-03-31 11:26:23 -03:00
cfag12864bfb.c framebuffer: Use fb_<level> 2013-10-29 12:53:07 +02:00
charlcd.c auxdisplay: charlcd: properly restore atomic counter on error path 2017-09-18 16:06:00 +02:00
hd44780.c auxdisplay: hd44780: Fix DT properties to include units of measurement 2017-04-08 17:48:19 +02:00
ht16k33.c auxdisplay: ht16k33: fix potential user-after-free on module unload 2019-03-23 14:35:13 +01:00
img-ascii-lcd.c auxdisplay: img-ascii-lcd: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE 2018-02-07 11:12:20 -08:00
Kconfig auxdisplay: fix broken menu 2018-07-03 11:24:56 +02:00
ks0108.c auxdisplay: ks0108: initialize local parport variable 2015-08-14 17:27:17 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
panel.c auxdisplay: charlcd: properly restore atomic counter on error path 2017-09-18 16:06:00 +02:00