lkml.org 
[lkml]   [2016]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] kvm: svm: fix unsigned compare less than zero comparison
    On Mon, Sep 19, 2016 at 07:11:59AM +0100, Colin King wrote:
    > From: Colin Ian King <colin.king@canonical.com>
    >
    > vm_data->avic_vm_id is a u32, so the check for a error
    > return (less than zero) such as -EAGAIN from
    > avic_get_next_vm_id currently has no effect whatsoever.
    > Fix this by using a temporary int for the comparison
    > and assign vm_data->avic_vm_id to this. I used an explicit
    > u32 cast in the assignment to show why vm_data->avic_vm_id
    > cannot be used in the assign/compare steps.
    >
    > Signed-off-by: Colin Ian King <colin.king@canonical.com>

    Acked-by: Joerg Roedel <jroedel@suse.de>

    \
     
     \ /
      Last update: 2016-09-19 12:06    [W:3.612 / U:0.480 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site