xen-netfront: update num_queues to real created
authorJoe Jin <joe.jin@oracle.com>
Mon, 19 Oct 2015 05:37:17 +0000 (13:37 +0800)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 15 Feb 2016 20:42:45 +0000 (15:42 -0500)
commite829a72dad76e17cd1406e55c3a6cd9efa9eb99e
treeb6519edfad1ab63771ed62badd3435cee3d6efbd
parentaa57c62d4a3bcd75f458b5b1d8ab3de805df90ef
xen-netfront: update num_queues to real created

[ Upstream commit ca88ea1247dfee094e2467a3578eaec9bdf0833a ]

Sometimes xennet_create_queues() may failed to created all requested
queues, we need to update num_queues to real created to avoid NULL
pointer dereference.

Signed-off-by: Joe Jin <joe.jin@oracle.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: David S. Miller <davem@davemloft.net>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/net/xen-netfront.c