Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S946273AbcJaUGa (ORCPT ); Mon, 31 Oct 2016 16:06:30 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:57166 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S946214AbcJaUG0 (ORCPT ); Mon, 31 Oct 2016 16:06:26 -0400 Date: Mon, 31 Oct 2016 16:06:23 -0400 (EDT) Message-Id: <20161031.160623.714189344925104774.davem@davemloft.net> To: dongli.zhang@oracle.com Cc: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, netdev@vger.kernel.org, boris.ostrovsky@oracle.com, david.vrabel@citrix.com, jgross@suse.com Subject: Re: [PATCH 1/1] xen-netfront: do not cast grant table reference to signed short From: David Miller In-Reply-To: <1477892309-7150-1-git-send-email-dongli.zhang@oracle.com> References: <1477892309-7150-1-git-send-email-dongli.zhang@oracle.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 31 Oct 2016 12:06:50 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 523 Lines: 15 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. > > Signed-off-by: Dongli Zhang 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.