Maxim Syrchin schrieb:
> Denis Oliver Kropp wrote:
> 
>> Maxim Syrchin schrieb:
>>
>>> Hello all.
>>>
>>> fusion_entry_destroy() function removes entry while it being locked. 
>>> It can have a lot of bad consequences (e.g. in case of deadlock 
>>> detection code in kernel it causes segmentation fault). Possible fix 
>>> for this case is attached, please take a look on it.
>>
>>
>> Thanks! I'll add it, though I think it should be allowed to destroy a 
>> locked mutex. It's destroyed anyways, so why do the unlock?
>>
> Why do the unlock ? IMHO it is some kind of clean up :)) I agree - 
> nobody uses removed mutex from fusion.
> But actually we do not destroy mutex. We do kfree on "struct entry" 
> which holds mutex variable "lock". So, mutex remains locked, but it's 
> variable is lost and can be allocated/rewrited by other application or 
> kernel driver.  So, if some code monitor mutexes (such as deadlock 
> detection code or code for gathering preemption statistic) it will work 
> incorrectly or cause segfault.

Thanks for the explanation, I saw it already, see other mail :)

-- 
Best regards,
   Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"

_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to