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

Re: [Xen-devel] [PATCH 1/2] xenstore: set correct error code when violating quota



On Tue, Mar 21, 2017 at 06:21:24PM +0100, Juergen Gross wrote:
> On 21/03/17 18:16, Wei Liu wrote:
> > On Tue, Mar 21, 2017 at 05:14:47PM +0000, Wei Liu wrote:
> >> On Mon, Mar 20, 2017 at 09:00:20AM +0100, Juergen Gross wrote:
> >>> When the number of permitted xenstore entries for a domain is being
> >>> exceeded the operation trying to create a new entry is denied.
> >>> Unfortunately errno isn't being set in this case so the error code
> >>> returned to the client is undefined.
> >>>
> >>> Set errno to ENOSPC in this case.
> >>>
> >>> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
> >>
> >> Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> >>
> >> But ...
> >>
> >>> ---
> >>> This is a backport candidate.
> >>> ---
> >>>  tools/xenstore/xenstored_core.c | 4 +++-
> >>>  1 file changed, 3 insertions(+), 1 deletion(-)
> >>>
> >>> diff --git a/tools/xenstore/xenstored_core.c 
> >>> b/tools/xenstore/xenstored_core.c
> >>> index 5c659d8..ed80345 100644
> >>> --- a/tools/xenstore/xenstored_core.c
> >>> +++ b/tools/xenstore/xenstored_core.c
> >>> @@ -937,8 +937,10 @@ static struct node *construct_node(struct connection 
> >>> *conn, const void *ctx,
> >>>   if (!parent)
> >>>           return NULL;
> >>
> >> What about this and other places?
> > 
> > Oh, this relies on errno being set in some other place(s).
> > 
> > This is really poor error handling style... :-/
> 
> I can fix this up in another patch, but I don't think this should
> be done in this patch (and possibly not in 4.9).
> 

Of course. I didn't mean to ask you fix them in one patch.

> 
> Juergen
> 

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

 


Rackspace

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