Re: [PATCH 31/36] security,rcu: convert call_rcu(user_update_rcu_disposal) to kfree_rcu()

From: David Howells
Date: Thu Mar 31 2011 - 14:53:41 EST


David Howells <dhowells@xxxxxxxxxx> wrote:

> > The rcu callback user_update_rcu_disposal() just calls a kfree(),
> > so we use kfree_rcu() instead of the call_rcu(user_update_rcu_disposal).
> >
> > Signed-off-by: Lai Jiangshan <laijs@xxxxxxxxxxxxxx>
>
> Nice idea, but how do you handle the container_of()?

Actually, you simply assume that the rcu_head is at the front of the struct,
right? If you do that, you should alter the comment on struct
user_key_payload in keys/user-type.h to note that this must be at the front.

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