Should not allocate queues number more than online cpus.
Signed-off-by: Joe Jin <[email protected]>
Cc: Boris Ostrovsky <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: David S. Miller <[email protected]>
---
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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html