[PATCH RFC] cr: pts: detect use of multiple devpts mounts in container

Matt Helsley matthltc at us.ibm.com
Thu Apr 29 10:41:06 PDT 2010

On Thu, Apr 29, 2010 at 10:28:48AM -0500, Serge E. Hallyn wrote:
> We don't support multiple devpts mounts in a container.  So
> bail on checkpoint if a container has them.  This will cause
> checkpoint to fail of a container which still has a pty from
> parent container in use.
> Note one issue with this is the register_checkpoint_obj(&&ckpt_obj_ptsns_ops)
> done from module_init().  We either need to add a matching unregister,

That's a rather significant problem. We need a matching
unregister_checkpoint_obj() and we need to be sure that none of the functions
specified in the ckpt_obj_ops are executing when the module is finally removed.

Is there a way to do that without holding any locks during ckpt_obj_op
calls? I've been thinking about how to do it with RCU:

	struct ckpt_obj_ops *ops;

	ops = ckpt_obj_ops[type];
	get_module(ops->owner); /* try_module_get() */

That should also ensure that the module won't be removed until the operation
is complete. However it seems quite absurd to grab a reference to a module
just to use its grab and drop ops. We'll probably spend more time in the
module code...

Regardless, the register side requires a spinlock to protect writes to the
ckpt_obj_ops array (inside register_checkpoint_obj()).


More information about the Containers mailing list