[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5816.1219325052@redhat.com>
Date: Thu, 21 Aug 2008 14:24:12 +0100
From: David Howells <dhowells@...hat.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: dhowells@...hat.com, Harvey Harrison <harvey.harrison@...il.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] cred: remove const qualifiers
Andrew Morton <akpm@...ux-foundation.org> wrote:
> That information should have been included in a code comment.
It was explained in the covering note:
Subject: [PATCH 00/24] Introduce credentials [ver #7]
...
(c) task_struct::cred is a const struct cred *, as are all pointers
that aren't used specifically for creating new credentials. This
catches places that are changing creds when they shouldn't be at
compile time.
To get a new ref on a const cred, use get_cred() which casts away
the const and calls atomic_inc().
It should've gone in the log entry for the "CRED: Inaugurate COW credentials"
patch and also into the documentation. I don't know whether I can amend the
former, but I can amend the latter. I'll also amend the comment to make it
crystal clear.
David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists