Linux Container Development
 help / color / mirror / Atom feed
From: Dan Smith <danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Oren Laadan <orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: [PATCH 2/3] c/r: add checkpoint/restore methods to struct proto_ops
Date: Mon, 17 Aug 2009 13:41:47 -0700	[thread overview]
Message-ID: <87r5va5g1g.fsf@caffeine.danplanet.com> (raw)
In-Reply-To: <1250539931-12951-3-git-send-email-orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org> (Oren Laadan's message of "Mon\, 17 Aug 2009 16\:12\:10 -0400")

OL> -	if ((h->sock.type != SOCK_DGRAM) && (h->sock.type != SOCK_STREAM)) {
OL> -		ckpt_debug("Socket type %i not supported", h->sock.type);
OL> +	if (h->sock.type & ~SOCK_TYPE_MASK)
OL>  		return ERR_PTR(-EINVAL);
OL> -	}

The idea here was to prevent a rewritten checkpoint stream from
causing us to call sock_create() with a type that we don't support.
Checking the mask may be functionally equivalent right now, but may
open the door for an interesting failure later, no?

OL>  static const struct proto_ops unix_seqpacket_ops = {
OL> @@ -565,6 +569,8 @@ static const struct proto_ops unix_seqpacket_ops = {
OL>  	.recvmsg =	unix_dgram_recvmsg,
OL>  	.mmap =		sock_no_mmap,
OL>  	.sendpage =	sock_no_sendpage,
OL> +	.checkpoint =	sock_unix_checkpoint,
OL> +	.restore =	sock_unix_restore,
OL>  };

Have you tested SEQPACKET?  I haven't.

Other than that, it looks fine to me and fails the same set of tests
that the current tree does.

-- 
Dan Smith
IBM Linux Technology Center
email: danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org

  parent reply	other threads:[~2009-08-17 20:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-17 20:12 c/r: some cleanup for sockets Oren Laadan
     [not found] ` <1250539931-12951-1-git-send-email-orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
2009-08-17 20:12   ` [PATCH 1/3] c/r: cleanup sock_file_restore()/sock_file_checkpoint() Oren Laadan
     [not found]     ` <1250539931-12951-2-git-send-email-orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
2009-08-17 20:57       ` Dan Smith
2009-08-17 20:12   ` [PATCH 2/3] c/r: add checkpoint/restore methods to struct proto_ops Oren Laadan
     [not found]     ` <1250539931-12951-3-git-send-email-orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
2009-08-17 20:41       ` Dan Smith [this message]
     [not found]         ` <87r5va5g1g.fsf-FLMGYpZoEPULwtHQx/6qkW3U47Q5hpJU@public.gmane.org>
2009-08-17 21:07           ` Oren Laadan
2009-08-17 21:21             ` Dan Smith
     [not found]               ` <874os65e6q.fsf-FLMGYpZoEPULwtHQx/6qkW3U47Q5hpJU@public.gmane.org>
2009-08-17 21:41                 ` Oren Laadan
2009-08-17 20:12   ` [PATCH 3/3] c/r: cleanup - follow naming conventions Oren Laadan
     [not found]     ` <1250539931-12951-4-git-send-email-orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
2009-08-17 20:48       ` Dan Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r5va5g1g.fsf@caffeine.danplanet.com \
    --to=danms-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox