Re: [PATCH 2/4] slub,rcu: don't assume the size of struct rcu_head

From: Christoph Lameter
Date: Tue Mar 08 2011 - 13:25:51 EST


On Tue, 1 Mar 2011, Lai Jiangshan wrote:

> - * RCU free overloads the RCU head over the LRU
> - */
> - struct rcu_head *head = (void *)&page->lru;
> + struct rcu_head *head;
> +
> + if (need_reserve_slab_rcu) {
> + int order = compound_order(page);
> + int offset = (PAGE_SIZE << order) - s->reserved;
> +
> + BUG_ON(s->reserved != sizeof(*head));

VM_BUG_ON is sufficient here I think.

Otherwise

Acked-by: Christoph Lameter <cl@xxxxxxxxx>

--
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/