From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37185) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VU1Sx-00011T-PX for qemu-devel@nongnu.org; Wed, 09 Oct 2013 17:38:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VU1Sr-0003it-PW for qemu-devel@nongnu.org; Wed, 09 Oct 2013 17:38:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VU1Sr-0003ih-Hq for qemu-devel@nongnu.org; Wed, 09 Oct 2013 17:38:41 -0400 From: Paul Moore Date: Wed, 09 Oct 2013 17:38:37 -0400 Message-ID: <1588380.mlDluTcmql@sifl> In-Reply-To: <1381279346-23676-4-git-send-email-otubo@linux.vnet.ibm.com> References: <1381279346-23676-1-git-send-email-otubo@linux.vnet.ibm.com> <1381279346-23676-4-git-send-email-otubo@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [Qemu-devel] [PATCHv3 3/3] seccomp: general fixes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Otubo Cc: coreyb@linux.vnet.ibm.com, qemu-devel@nongnu.org, anthony@codemonkey.ws On Tuesday, October 08, 2013 09:42:26 PM Eduardo Otubo wrote: > 1) On qemu-seccomp.c:255, the variable ctx was being used > uninitialized; now it's initialized with NULL and it's being checked at > the end of the function. > > 2) Changed the name of the command line option from "enable" to > "sandbox" for a better understanding from user side. > > Signed-off-by: Eduardo Otubo > --- > qemu-seccomp.c | 4 ++-- > vl.c | 6 +++--- > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/qemu-seccomp.c b/qemu-seccomp.c > index 84a42bc..fdd0de3 100644 > --- a/qemu-seccomp.c > +++ b/qemu-seccomp.c > @@ -258,7 +258,7 @@ seccomp_return: > int seccomp_start(int list_type) > { > int rc = 0; > - scmp_filter_ctx ctx; > + scmp_filter_ctx ctx = NULL; > > switch (list_type) { > case WHITELIST: > @@ -285,7 +285,7 @@ int seccomp_start(int list_type) > > rc = seccomp_load(ctx); > > - seccomp_return: > +seccomp_return: > if (ctx) > seccomp_release(ctx); > return rc; Any particular reason these changes weren't folded into patch 1/3? -- paul moore security and virtualization @ redhat