[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xsplice: Don't perform multiple operations on same payload once work is scheduled.



>>> On 29.04.16 at 03:52, <konrad@xxxxxxxxxx> wrote:
> --- a/xen/common/xsplice.c
> +++ b/xen/common/xsplice.c
> @@ -1363,6 +1363,9 @@ static int xsplice_action(xen_sysctl_xsplice_action_t 
> *action)
>          return PTR_ERR(data);
>      }
>  
> +    if ( data->rc == -EAGAIN ) /* schedule_work has been called. */
> +        goto out;

And nothing else can set data->rc to this value, now or in the
future? Because if that's possible, you'd deny any further actions
on that payload.

> @@ -1423,6 +1426,7 @@ static int xsplice_action(xen_sysctl_xsplice_action_t 
> *action)
>          break;
>      }
>  
> + out:
>      spin_unlock(&payload_lock);
>  
>      return rc;

Taking both together, and looking at patch 2 of the original series, I'm
getting the impression you return success in that case rather than e.g.
-EBUSY or indeed -EAGAIN.

Jan


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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.