Messages in this thread | | | From | Linus Torvalds <> | Date | Tue, 27 Jul 2010 09:16:16 -0700 | Subject | Re: [PATCH] cred - synchronize rcu before releasing cred |
| |
On Tue, Jul 27, 2010 at 8:50 AM, Jiri Olsa <jolsa@redhat.com> wrote: > > got no objections on linux-security-module and acked by David. > Noone pick it, so got advice to send this directly to you.
The patch seems fundamentally buggy.
The whole patch seems to be based on "nobody can ever use get_cred/put_cred, because concurrent use will then trigger the BUG_ON() in __put_cred()".
But that's a bug in general, not in this particular usage that isn't all that different from other uses. So rather than just remove the code that uses the refcounting, we should either:
- FIX the damn ref-counting so that it works without bugging out
or
- remove the broken functions entirely.
In other words - why are we working around what looks like a bug, rather than fixing the bug itself?
In particular, the code you remove seems to be basically _identical_ to get_task_cred(). So if the code you remove is buggy, then so is any use of get_task_cred() - no?
So please explain why get_task_cred() is ok, but the particular use of get_cred/put_cred that you removed is not.
Hmm? What am I missing?
Linus
| |