]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
Drivers: hv: utils: fix hvt_op_poll() return value on transport destroy
authorVitaly Kuznetsov <vkuznets@redhat.com>
Wed, 16 Dec 2015 00:27:26 +0000 (16:27 -0800)
committerTim Gardner <tim.gardner@canonical.com>
Mon, 29 Feb 2016 16:00:40 +0000 (09:00 -0700)
The return type of hvt_op_poll() is unsigned int and -EBADF is
inappropriate, poll functions return POLL* statuses.

Reported-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 77b744a598d604de49df79cf161bbd1809a6948a)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/hv/hv_utils_transport.c

index ee20b5074238534a9a448b112d8a9098295d0bef..4f42c0e20c20fd12f6de24d4490fb23952b7ed79 100644 (file)
@@ -109,7 +109,7 @@ static unsigned int hvt_op_poll(struct file *file, poll_table *wait)
        poll_wait(file, &hvt->outmsg_q, wait);
 
        if (hvt->mode == HVUTIL_TRANSPORT_DESTROY)
-               return -EBADF;
+               return POLLERR | POLLHUP;
 
        if (hvt->outmsg_len > 0)
                return POLLIN | POLLRDNORM;