Re: [PATCH 1/1] xen-netfront: do not cast grant table reference to signed short

From: David Miller
Date: Mon Oct 31 2016 - 16:08:08 EST


From: Dongli Zhang <dongli.zhang@xxxxxxxxxx>
Date: Mon, 31 Oct 2016 13:38:29 +0800

> While grant reference is of type uint32_t, xen-netfront erroneously casts
> it to signed short in BUG_ON().
>
> This would lead to the xen domU panic during boot-up or migration when it
> is attached with lots of paravirtual devices.
>
> Signed-off-by: Dongli Zhang <dongli.zhang@xxxxxxxxxx>

Since this is consistent with how the macros in linux/err.h handle "is
this an error" checks, this change looks good to me.

Applied, thanks.