search for: buffer_reserv

Displaying 7 results from an estimated 7 matches for "buffer_reserv".

Did you mean: buffer_reserve
2020 Jun 02
2
Re: [PATCH nbdkit 3/5] vddk: Miscellaneous improvements to reexec code.
...g ("open: %s: %m", cmdline_file); > return; > } > > - do { > - char *p = realloc (buf, buflen * 2); > + for (;;) { > ssize_t r; > > - if (!p) { > - nbdkit_debug ("failure to parse original argv: %m"); > + if (buffer_reserve (&buf, 512) == -1) { > + nbdkit_debug ("realloc: %m"); > return; > } Pre-existing bug, which you did not fix here. If we failed here, we are leaking fd. You slightly improved the situation by marking the leaked fd O_CLOEXEC, but that really doesn'...
2020 Jun 02
0
Re: [PATCH nbdkit 3/5] vddk: Miscellaneous improvements to reexec code.
...m", cmdline_file); > > return; > > } > >- do { > >- char *p = realloc (buf, buflen * 2); > >+ for (;;) { > > ssize_t r; > >- if (!p) { > >- nbdkit_debug ("failure to parse original argv: %m"); > >+ if (buffer_reserve (&buf, 512) == -1) { > >+ nbdkit_debug ("realloc: %m"); > > return; > > } > > Pre-existing bug, which you did not fix here. If we failed here, we > are leaking fd. You slightly improved the situation by marking the > leaked fd O_CLOEX...
2020 Jun 02
0
[PATCH nbdkit 3/5] vddk: Miscellaneous improvements to reexec code.
...;failure to parse original argv: %m"); + nbdkit_debug ("open: %s: %m", cmdline_file); return; } - do { - char *p = realloc (buf, buflen * 2); + for (;;) { ssize_t r; - if (!p) { - nbdkit_debug ("failure to parse original argv: %m"); + if (buffer_reserve (&buf, 512) == -1) { + nbdkit_debug ("realloc: %m"); return; } - buf = p; - buflen *= 2; - r = read (fd, buf + len, buflen - len); + r = read (fd, buf.ptr + buf.size, buf.alloc - buf.size); if (r == -1) { - nbdkit_debug ("failure to parse o...
2020 Jun 02
1
Re: [PATCH nbdkit 3/5] vddk: Miscellaneous improvements to reexec code.
...gt; > I was wondering if we should define conditions where we want reexec to > be skipped (probably if /proc/self/... files don't exist, since it's > likely that it isn't a "sufficiently Linux-like" platform). We would > hard fail for all the other errors such as buffer_reserve failing > above. What do you think? Hard fail for things like malloc failure make sense (if we fail to re-exec but continue on in spite of a malloc failure, we'll probably die real soon at our next malloc, at which point dying asap is saner) Although vddk already assumes a Linux system...
2020 Jun 02
9
[PATCH nbdkit 0/5] vddk: Fix password parameter.
Probably needs a bit of cleanup, but seems like it is generally the right direction. One thing I've noticed is that the expect test randomly (but rarely) hangs :-( I guess something is racey but I don't know what at the moment. Rich.
2009 Jul 27
3
virtio-serial: An interface for host-guest communication
Hello all, This are the latest version of the patches. Lots of things have changed since the last submission. A few of which I remember: - VNC copy / paste works* (* conditions apply) - client vnc copies get propagated to guest port 3 (/dev/vmch3) - guest writes to port 3 (/dev/vmch3) go straight to client's clipboard - sysfs hooks to autodiscover ports - support for 64 ports in this
2009 Jul 27
3
virtio-serial: An interface for host-guest communication
Hello all, This are the latest version of the patches. Lots of things have changed since the last submission. A few of which I remember: - VNC copy / paste works* (* conditions apply) - client vnc copies get propagated to guest port 3 (/dev/vmch3) - guest writes to port 3 (/dev/vmch3) go straight to client's clipboard - sysfs hooks to autodiscover ports - support for 64 ports in this