From: David Howells <dhowells@redhat.com>
To: Edwin van Vliet <edwin@cheatah.nl>
Cc: dhowells@redhat.com, akpm@linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kernel/cred: Fix bug on cred reference count
Date: Sat, 09 Jul 2011 10:13:47 +0100 [thread overview]
Message-ID: <10155.1310202827@redhat.com> (raw)
In-Reply-To: <1310194141-18700-1-git-send-email-edwin@cheatah.nl>
Edwin van Vliet <edwin@cheatah.nl> wrote:
> The comment above states that the old obj ref and subj ref should BOTH be
> released. However, the line is repeated so the old obj ref is released twice
> yet the subj ref is not. So either the comment is wrong, or this is simpy a
> bug. Releasing the same ref twice seems wrong in any case.
The comment is correct and the double release is correct.
task_struct has *two* refs to the cred being replaced and both need to be
updated:
current->real_cred - The objective cred
current->cred - The subjective cred
The subjective cred is the one used by a task to access other objects; the
objective cred details how the task is perceived by the outside world and
affects how other tasks act upon it.
Normally a task's two cred pointers point to the same cred, but under some
circumstances (such as in cachefiles), the subjective cred can be overridden.
David
prev parent reply other threads:[~2011-07-09 9:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-09 6:49 [PATCH] kernel/cred: Fix bug on cred reference count Edwin van Vliet
2011-07-09 9:13 ` David Howells [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=10155.1310202827@redhat.com \
--to=dhowells@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=edwin@cheatah.nl \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.