[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] block/ssh: Avoid segfault if inet_connect do
From: |
Richard W.M. Jones |
Subject: |
Re: [Qemu-devel] [PATCH v2] block/ssh: Avoid segfault if inet_connect doesn't set errno. |
Date: |
Wed, 22 Jul 2015 14:17:08 +0100 |
User-agent: |
Mutt/1.5.20 (2009-12-10) |
On Wed, Jul 22, 2015 at 02:10:51PM +0100, Daniel P. Berrange wrote:
> There are a reasonable number of other uses of inet_connect() in QEMU,
> so can't we fix inet_connect() itself to set EINVAL in the error case
> instead of just fixing one caller.
The only users I can find are block/nbd.c and block/sheepdog.c, and
neither of those is expecting errno to be set. So I think my use of
errno in block/ssh.c was flat out wrong, although it happened to work
most of the time.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top