* [PATCH v1] tools/libxc: report malloc errors in writev_exact
@ 2020-09-23 6:48 Olaf Hering
2020-09-24 20:21 ` Andrew Cooper
0 siblings, 1 reply; 3+ messages in thread
From: Olaf Hering @ 2020-09-23 6:48 UTC (permalink / raw)
To: xen-devel; +Cc: Olaf Hering, Ian Jackson, Wei Liu
The caller of writev_exact should be notified about malloc errors
when dealing with partial writes.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
I think this is a backport candidate...
tools/libs/ctrl/xc_private.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/libs/ctrl/xc_private.c b/tools/libs/ctrl/xc_private.c
index 8af96b1b7e..3fab94f9c0 100644
--- a/tools/libs/ctrl/xc_private.c
+++ b/tools/libs/ctrl/xc_private.c
@@ -721,6 +721,7 @@ int writev_exact(int fd, const struct iovec *iov, int iovcnt)
if ( !local_iov )
{
saved_errno = ENOMEM;
+ rc = -1;
goto out;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1] tools/libxc: report malloc errors in writev_exact
2020-09-23 6:48 [PATCH v1] tools/libxc: report malloc errors in writev_exact Olaf Hering
@ 2020-09-24 20:21 ` Andrew Cooper
2020-09-30 15:07 ` Wei Liu
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cooper @ 2020-09-24 20:21 UTC (permalink / raw)
To: Olaf Hering, xen-devel; +Cc: Ian Jackson, Wei Liu
On 23/09/2020 07:48, Olaf Hering wrote:
> The caller of writev_exact should be notified about malloc errors
> when dealing with partial writes.
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] tools/libxc: report malloc errors in writev_exact
2020-09-24 20:21 ` Andrew Cooper
@ 2020-09-30 15:07 ` Wei Liu
0 siblings, 0 replies; 3+ messages in thread
From: Wei Liu @ 2020-09-30 15:07 UTC (permalink / raw)
To: Andrew Cooper; +Cc: Olaf Hering, xen-devel, Ian Jackson, Wei Liu
On Thu, Sep 24, 2020 at 09:21:10PM +0100, Andrew Cooper wrote:
> On 23/09/2020 07:48, Olaf Hering wrote:
> > The caller of writev_exact should be notified about malloc errors
> > when dealing with partial writes.
> >
> > Signed-off-by: Olaf Hering <olaf@aepfle.de>
>
> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked + applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-30 15:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-23 6:48 [PATCH v1] tools/libxc: report malloc errors in writev_exact Olaf Hering
2020-09-24 20:21 ` Andrew Cooper
2020-09-30 15:07 ` Wei Liu
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.