]> git.itanic.dy.fi Git - linux-stable/commitdiff
tools: hv: fcopy: set 'error' in case an unknown operation was requested
authorVitaly Kuznetsov <vkuznets@redhat.com>
Mon, 17 Sep 2018 04:14:55 +0000 (04:14 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Oct 2018 06:54:28 +0000 (08:54 +0200)
commit c2d68afba86d1ff01e7300c68bc16a9234dcd8e9 upstream.

'error' variable is left uninitialized in case we see an unknown operation.
As we don't immediately return and proceed to pwrite() we need to set it
to something, HV_E_FAIL sounds good enough.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/hv/hv_fcopy_daemon.c

index 785f4e95148cf13a48458c00147162ef503d6ef6..7a1039c15e7d9e312134acc78194ffa8fc8b21fa 100644 (file)
@@ -233,6 +233,7 @@ int main(int argc, char *argv[])
                        break;
 
                default:
+                       error = HV_E_FAIL;
                        syslog(LOG_ERR, "Unknown operation: %d",
                                buffer.hdr.operation);