From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Jin Subject: [PATCH 1/1] xen-netfront: limit max queues number to online cpus Date: Fri, 23 Oct 2015 08:50:51 +0800 Message-ID: <5629846B.8000001@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, xen-devel@lists.xenproject.org To: boris.ostrovsky@oracle.com, Konrad Rzeszutek Wilk , "David S. Miller" Return-path: Received: from userp1040.oracle.com ([156.151.31.81]:36158 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965464AbbJWAu7 (ORCPT ); Thu, 22 Oct 2015 20:50:59 -0400 Sender: netdev-owner@vger.kernel.org List-ID: Should not allocate queues number more than online cpus. Signed-off-by: Joe Jin Cc: Boris Ostrovsky Cc: Konrad Rzeszutek Wilk Cc: David S. Miller --- drivers/net/xen-netfront.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index f821a97..1eebd4e 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c @@ -2137,7 +2137,7 @@ static int __init netif_init(void) /* Allow as many queues as there are CPUs if user has not * specified a value. */ - if (xennet_max_queues == 0) + if (xennet_max_queues == 0 || xennet_max_queues > num_online_cpus()) xennet_max_queues = num_online_cpus(); return xenbus_register_frontend(&netfront_driver); -- 1.7.1