MEN-Mikro-Elektronik / 13MD05-90

MDIS5 System Package for Linux (including drivers)
Other
4 stars 4 forks source link

vme4l: fix null pointer dereference when exitin module #286

Closed mad-jsanjuan closed 1 year ago

mad-jsanjuan commented 1 year ago

vme4l-core module is trying to access a null pointer on exit with vme4l_cleanup_module(). This G_bDrv pointer is assigned to NULL previously with vme4l_unregister_bridge_driver().

Fix this by protecting the callback function G_bDrv->releaseAddrWindow as this may get called via an ioctl and not just when doing the module cleanup.

fixes: 22d760a642f41d0da7fd3345ddffb279f9537de7 ("vme4l-core.c: applied patch from M.Suminski to release address windows")

mad-jsanjuan commented 1 year ago

The CI compilation test fails because of this remaining 6.1 compilation issue: https://github.com/MEN-Mikro-Elektronik/13MD05-90/issues/283 .