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

2016-11-01 Thread David Miller
From: Dongli Zhang Date: Mon, 31 Oct 2016 21:46:09 -0700 (PDT) > David, I am very sorry for this error and I will be careful the next time. > Would you please let me know if I should resend a new patch or an incremental > based on previous one at >

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

2016-11-01 Thread David Miller
From: Dongli Zhang Date: Mon, 31 Oct 2016 21:46:09 -0700 (PDT) > David, I am very sorry for this error and I will be careful the next time. > Would you please let me know if I should resend a new patch or an incremental > based on previous one at >

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

2016-10-31 Thread Dongli Zhang
-de...@lists.xenproject.org, net...@vger.kernel.org, boris.ostrov...@oracle.com, david.vra...@citrix.com, jgr...@suse.com Sent: Tuesday, November 1, 2016 4:06:27 AM GMT +08:00 Beijing / Chongqing / Hong Kong / Urumqi Subject: Re: [PATCH 1/1] xen-netfront: do not cast grant table reference to signed short From: Don

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

2016-10-31 Thread Dongli Zhang
-de...@lists.xenproject.org, net...@vger.kernel.org, boris.ostrov...@oracle.com, david.vra...@citrix.com, jgr...@suse.com Sent: Tuesday, November 1, 2016 4:06:27 AM GMT +08:00 Beijing / Chongqing / Hong Kong / Urumqi Subject: Re: [PATCH 1/1] xen-netfront: do not cast grant table reference to signed short From: Don

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

2016-10-31 Thread David Miller
From: Dongli Zhang 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

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

2016-10-31 Thread David Miller
From: Dongli Zhang 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. >

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

2016-10-31 Thread Jan Beulich
>>> On 31.10.16 at 09:28, wrote: >> > ref = gnttab_claim_grant_reference(>gref_rx_head); >> > -BUG_ON((signed short)ref < 0); >> > +WARN_ON_ONCE(IS_ERR_VALUE((unsigned long)ref)); > >> You really need to cast to plain (or

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

2016-10-31 Thread Jan Beulich
>>> On 31.10.16 at 09:28, wrote: >> > ref = gnttab_claim_grant_reference(>gref_rx_head); >> > -BUG_ON((signed short)ref < 0); >> > +WARN_ON_ONCE(IS_ERR_VALUE((unsigned long)ref)); > >> You really need to cast to plain (or signed) long here -

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

2016-10-31 Thread Dongli Zhang
:00 Beijing / Chongqing / Hong Kong / Urumqi Subject: Re: [Xen-devel] [PATCH 1/1] xen-netfront: do not cast grant table reference to signed short >>> On 31.10.16 at 06:38, <dongli.zh...@oracle.com> wrote: > --- a/drivers/net/xen-netfront.c > +++ b/drivers/net/xen-netfront.c &

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

2016-10-31 Thread Dongli Zhang
:00 Beijing / Chongqing / Hong Kong / Urumqi Subject: Re: [Xen-devel] [PATCH 1/1] xen-netfront: do not cast grant table reference to signed short >>> On 31.10.16 at 06:38, wrote: > --- a/drivers/net/xen-netfront.c > +++ b/drivers/net/xen-netfront.c > @@ -304,7 +3

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

2016-10-31 Thread Jan Beulich
>>> On 31.10.16 at 06:38, wrote: > --- a/drivers/net/xen-netfront.c > +++ b/drivers/net/xen-netfront.c > @@ -304,7 +304,7 @@ static void xennet_alloc_rx_buffers(struct netfront_queue > *queue) > queue->rx_skbs[id] = skb; > > ref =

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

2016-10-31 Thread Jan Beulich
>>> On 31.10.16 at 06:38, wrote: > --- a/drivers/net/xen-netfront.c > +++ b/drivers/net/xen-netfront.c > @@ -304,7 +304,7 @@ static void xennet_alloc_rx_buffers(struct netfront_queue > *queue) > queue->rx_skbs[id] = skb; > > ref =

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

2016-10-30 Thread Dongli Zhang
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 ---

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

2016-10-30 Thread Dongli Zhang
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 --- drivers/net/xen-netfront.c | 4 ++--