Re: [PATCH 2.5.30+] Second attempt at a shared credentials patch

Trond Myklebust (trond.myklebust@fys.uio.no)
Thu, 8 Aug 2002 23:55:05 +0200


>>>>> " " == Dave McCracken <dmccr@us.ibm.com> writes:

> --On Thursday, August 08, 2002 09:56:23 PM +0200 Trond
> Myklebust <trond.myklebust@fys.uio.no> wrote:

>> ... which begs the question: are you saying that there are no
>> SMP issues with CLONE_CRED and setting/reading the 'struct
>> cred' members?

> Yes, I'm saying there are no SMP issues with the shared cred
> structure. I looked for them and failed to find any.
> Credentials are not set cross-task, and are always done via
> atomic ops. I also failed to find any broader race conditions
> that would require a lock.

What if one thread is doing an RPC call while the other is changing
the 'groups' entry?

Given that the first thread wants both to copy and/or compare the
groups entry what prevents scenarios of the form?

Thread 1 Thread 2

change cred->ngroups
copy cred->ngroups
copy cred->groups
change cred->groups

Cheers,
Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/