All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ross Lagerwall <ross.lagerwall@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	andrew.cooper3@citrix.com,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	mpohlack@amazon.de, sasha.levin@oracle.com,
	xen-devel@lists.xenproject.org,
	Daniel De Graaf <dgdegra@tycho.nsa.gov>
Subject: Re: [PATCH v8 02/25] xen/xsplice: Hypervisor implementation of XEN_XSPLICE_op
Date: Mon, 25 Apr 2016 10:13:04 +0100	[thread overview]
Message-ID: <571DDFA0.6070601@citrix.com> (raw)
In-Reply-To: <571DF97402000078000E5310@prv-mh.provo.novell.com>

On 04/25/2016 10:03 AM, Jan Beulich wrote:
>>>> On 22.04.16 at 20:06, <konrad.wilk@oracle.com> wrote:
>> On Wed, Apr 20, 2016 at 02:18:48PM +0100, Ross Lagerwall wrote:
>>> On 04/13/2016 10:09 PM, Konrad Rzeszutek Wilk wrote:
>>> snip
>>>> +static int xsplice_action(xen_sysctl_xsplice_action_t *action)
>>>> +{
>>>> +    struct payload *data;
>>>> +    char n[XEN_XSPLICE_NAME_SIZE];
>>>> +    int rc;
>>>> +
>>>> +    rc = verify_name(&action->name, n);
>>>> +    if ( rc )
>>>> +        return rc;
>>>> +
>>>> +    spin_lock(&payload_lock);
>>>> +
>>>> +    data = find_payload(n);
>>>> +    if ( IS_ERR_OR_NULL(data) )
>>>> +    {
>>>> +        spin_unlock(&payload_lock);
>>>> +
>>>> +        if ( !data )
>>>> +            return -ENOENT;
>>>> +
>>>> +        return PTR_ERR(data);
>>>> +    }
>>>
>>> I think you need something like: rc = -EINVAL;
>>> here. Otherwise running "xen-xsplice unload <patch>" on an applied patch
>>> succeeds but fails to do anything.
>>
>> /me nods. Fixed.
>
> I don't follow: There's no path out of the if()'s body, and a proper
> error indicator gets handed to the caller via the two return
> statements. Why would this need converting to -EINVAL?
>

I intended that line to be inserted after the if statement to set a 
default return value for the unhandled paths through the following 
switch(), not to change the if().

-- 
Ross Lagerwall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-04-25  9:13 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-13 21:09 [PATCH v8] xSplice v1 design and implementation Konrad Rzeszutek Wilk
2016-04-13 21:09 ` [PATCH v8 01/25] xsplice: Design document Konrad Rzeszutek Wilk
2016-04-13 21:09 ` [PATCH v8 02/25] xen/xsplice: Hypervisor implementation of XEN_XSPLICE_op Konrad Rzeszutek Wilk
2016-04-20 13:18   ` Ross Lagerwall
2016-04-22 18:06     ` Konrad Rzeszutek Wilk
2016-04-25  9:03       ` Jan Beulich
2016-04-25  9:13         ` Ross Lagerwall [this message]
2016-04-13 21:09 ` [PATCH v8 03/25] libxc: Implementation of XEN_XSPLICE_op in libxc Konrad Rzeszutek Wilk
2016-04-13 21:09 ` [PATCH v8 04/25] xen-xsplice: Tool to manipulate xsplice payloads Konrad Rzeszutek Wilk
2016-04-13 21:09 ` [PATCH v8 05/25] arm/x86: Use struct virtual_region to do bug, symbol, and (x86) exception tables lookup Konrad Rzeszutek Wilk
2016-04-13 21:09 ` [PATCH v8 06/25] arm/x86/vmap: Add vmalloc_xen, vfree_xen and vm_init_type Konrad Rzeszutek Wilk
2016-04-13 21:09 ` [PATCH v8 07/25] x86/mm: Introduce modify_xen_mappings() Konrad Rzeszutek Wilk
2016-04-13 21:09 ` [PATCH v8 08/25] xsplice: Add helper elf routines Konrad Rzeszutek Wilk
2016-04-13 21:09 ` [PATCH v8 09/25] xsplice: Implement payload loading Konrad Rzeszutek Wilk
2016-04-13 21:09 ` [PATCH v8 10/25] xsplice: Implement support for applying/reverting/replacing patches Konrad Rzeszutek Wilk
2016-04-13 21:09 ` [PATCH v8 11/25] x86/xen_hello_world.xsplice: Test payload for patching 'xen_extra_version' Konrad Rzeszutek Wilk
2016-04-13 21:09 ` [PATCH v8 12/25] xsplice, symbols: Implement symbol name resolution on address Konrad Rzeszutek Wilk
2016-04-13 21:09 ` [PATCH v8 13/25] xsplice, symbols: Implement fast symbol names -> virtual addresses lookup Konrad Rzeszutek Wilk
2016-04-13 21:09 ` [PATCH v8 14/25] x86, xsplice: Print payload's symbol name and payload name in backtraces Konrad Rzeszutek Wilk
2016-04-13 21:09 ` [PATCH v8 15/25] xsplice: Add support for bug frames Konrad Rzeszutek Wilk
2016-04-13 21:09 ` [PATCH v8 16/25] xsplice: Add support for exception tables Konrad Rzeszutek Wilk
2016-04-13 21:09 ` [PATCH v8 17/25] xsplice: Add support for alternatives Konrad Rzeszutek Wilk
2016-04-13 21:09 ` [PATCH v8 18/25] build_id: Provide ld-embedded build-ids Konrad Rzeszutek Wilk
2016-04-13 21:09 ` [PATCH v8 19/25] HYPERCALL_version_op: Add VERSION_build_id to retrieve build-id Konrad Rzeszutek Wilk
2016-04-13 21:09 ` [PATCH v8 20/25] libxl: info: Display build_id of the hypervisor using XEN_VERSION_build_id Konrad Rzeszutek Wilk
2016-04-13 21:09 ` [PATCH v8 21/25] xsplice: Print build_id in keyhandler and on bootup Konrad Rzeszutek Wilk
2016-04-13 21:09 ` [PATCH v8 22/25] xsplice: Stacking build-id dependency checking Konrad Rzeszutek Wilk
2016-04-13 21:09 ` [PATCH v8 23/25] xsplice/xen_replace_world: Test-case for XSPLICE_ACTION_REPLACE Konrad Rzeszutek Wilk
2016-04-13 21:09 ` [PATCH v8 24/25] xsplice: Prevent duplicate payloads from being loaded Konrad Rzeszutek Wilk
2016-04-13 21:09 ` [PATCH v8 25/25] MAINTAINERS/xsplice: Add myself and Ross as the maintainers Konrad Rzeszutek Wilk
2016-04-13 21:57 ` [PATCH v8] xSplice v1 design and implementation Konrad Rzeszutek Wilk
2016-04-13 22:01   ` Konrad Rzeszutek Wilk

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=571DDFA0.6070601@citrix.com \
    --to=ross.lagerwall@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=ian.jackson@eu.citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=mpohlack@amazon.de \
    --cc=sasha.levin@oracle.com \
    --cc=sstabellini@kernel.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.