Re: [PATCH 00/30] C/R OpenVZ/Virtuozzo style

From: Dave Hansen
Date: Mon Apr 13 2009 - 07:16:49 EST


On Mon, 2009-04-13 at 13:14 +0400, Alexey Dobriyan wrote:
> [1] Do I inderstand correctly that cookie for shared object is an
> address on kernel stack? This is obviously unreliable, if yes :-)
>
> int objref;
> ...
> /* adding 'file' to the hash will keep a reference to it */
> new = cr_obj_add_ptr(ctx, file, &objref, CR_OBJ_FILE, 0);

No, that's just Oren's way to get two return variables.

He needs 'new' to figure out whether to write out the full file or just
an objref record. He also needs 'objref' itself in case of writing
either. cr_obj_add_ptr() modifies objref.

-- Dave

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