[PATCH] module: Fix unsafe iteration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2014-12-05 at 15:14 +0100, David Henningsson wrote:
> It looks like this could cause a problem in case somebody (ab)uses the 
> API like:
> 
> pa_module_unload_request(m, true);
> pa_module_unload(c, m, true);
> 
> ...later on, the deferred event triggers, and modules_pending_unload now 
> has dangling pointers.

Good point. I already fixed this in v2, because I was thinking that the
pa_hashmap_isempty() assertion in pa_core_free() might not be entirely
safe, but your scenario is even better justification for moving the
pa_hashmap_remove() call to pa_module_unload().

-- 
Tanu



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux