Subject: Re: Process credentials change
To: Bill Studenmund <firstname.lastname@example.org>
From: Jason Thorpe <email@example.com>
Date: 07/10/2006 14:01:13
On Jul 10, 2006, at 1:39 PM, Bill Studenmund wrote:
> My concerns are around what's going on if l->l_cred != p->p_cred.
> Since a
> process is supposed to have one credential state, if we ever change
> p_cred, we REALLY need all the l_creds to change at the same time. And
> that means a global lock.
Unless you consider that an LWP entering the kernel is like a
"transaction", and that the credential state should remain constant
from the beginning to the end of the "transaction". Do you agree?
If so, then it makes PERFECT sense to set the LWP's creds upon kernel
entry, and not change those creds unless the LWP is requesting a cred
change. That way, a cred change by the proc while the LWP sleeps
(disk I/O?) won't screw up whatever the LWP is (legitimately) trying
to do with the creds it started out with.