[Unionfs] Re: 2.6.26-rc4: smack and unionfs deadlock

Casey Schaufler casey at schaufler-ca.com
Fri Jun 6 01:11:19 EDT 2008


Casey Schaufler wrote:
> Luiz Fernando N. Capitulino wrote:
>>  Hi Casey,
>>
>>  I've got another deadlock which only happens when CONFIG_SMACK is
>> enabled, but this time it happens with unionfs and I don't know
>> which of the two is causing the problem.
>>
>>   
>
> I need a little education. unionfs has a lock on its superblock,
> which appears to be where we're getting hung up. What condition
> is this lock for? It would seem that a getxattr would be pretty
> safe without having the superblock locked, but no one is going
> to accuse me of being excessively skilled at locking issues.
> I'm going to see what goes wrong without that lock, and if removing
> it takes care of the problem. There may be more than one dragon
> in these waters.
>
> Thank you.
>
OK. The sb associated with unionfs has a magic number of 0,
which implies you haven't set it. Is this intentional, or
do you just figure no one cares, or should care?

I can relieve the hang by having the Smack code treat
unionfs (actually the "0" file system) as one of the
special cases. The "real" file shows the correct smack
value, the unionfs shows "*", and access is correctly
controlled in either case. I'm still looking to see what
to do better, and I'd still like to understand the locking
strategy better.

Thank you.


-- 

----------------------

Casey Schaufler
casey at schaufler-ca.com
650.906.1780




More information about the unionfs mailing list