Skip to content

Fix for the memory leak which leads to eventual crash of the linux kernel

Dmytro Levit requested to merge bugfix/driver_reload_crash into master

I've found a memory leak which causes the system crash during driver reloading routine.

The memory is allocated in the altera_pci_probe function by the function pci_alloc_consistent, but never freed. I copied the deallocation loop from the error handler which should handle the deallocation if the allocation fails to the altera_pci_remove function.

During my tests the system with the original driver crashed after 200-400 reloads, but I observed no crashes with the patch in ~3000 reloads.

Merge request reports