Re: [directfb-dev] linux-fusion lock problem



Victor Liu wrote:
> Hi,
>  
> while I am using DirectFB with fusion, some time the application was locked. we debugged into, find lock is in fusion. I looked the code, found a place seems missed unlock (see red line or comment). if any one knows linux-fusion, please make sure. both 3.x or 7.x have same code.
>  
> Thanks,
> Victor Liu
>  
> int
> fusion_skirmish_prevail (FusionDev *dev, int id, int fusion_id)
> {
>   int ret;
>   FusionSkirmish *skirmish;
> #ifdef FUSION_DEBUG_SKIRMISH_DEADLOCK
>   FusionSkirmish *s;
>   int i;
>   bool outer = true;
> #endif
>   dev->stat.skirmish_prevail_swoop++;
>   ret = fusion_skirmish_lock( &dev->skirmish, id, true, &skirmish );
>   if (ret)
>     return ret;
>  
>   ......
>  
>   up( &dev->skirmish.lock );
>   while (skirmish->lock_pid) {
>     ret = fusion_skirmish_wait( skirmish, NULL );
>     if (ret)
>     {
>       fusion_skirmish_unlock( skirmish );  // original code does not have this line

IIRC, a non-zero return value (error) means the lock is not reacquired.
Only if the call was successful, the code needs to unlock it.

But I'm checking the code now (fusion_entry_wait).

-- 
Best regards,
  Denis Oliver Kropp

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


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