diff options
author | Wei Liu <wei.liu2@citrix.com> | 2014-06-23 10:50:17 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-25 15:59:47 -0700 |
commit | f7b50c4e7ced702d80d3b873d81a2cdafb580f13 (patch) | |
tree | 9f641ef3e6b47cf727b8003603d008e4b5507bc2 /drivers/hwmon/adm1031.c | |
parent | 66c965f5e1b702da2b5871a909b47034c62195d8 (diff) | |
download | blackbird-op-linux-f7b50c4e7ced702d80d3b873d81a2cdafb580f13.tar.gz blackbird-op-linux-f7b50c4e7ced702d80d3b873d81a2cdafb580f13.zip |
xen-netback: bookkeep number of active queues in our own module
The original code uses netdev->real_num_tx_queues to bookkeep number of
queues and invokes netif_set_real_num_tx_queues to set the number of
queues. However, netif_set_real_num_tx_queues doesn't allow
real_num_tx_queues to be smaller than 1, which means setting the number
to 0 will not work and real_num_tx_queues is untouched.
This is bogus when xenvif_free is invoked before any number of queues is
allocated. That function needs to iterate through all queues to free
resources. Using the wrong number of queues results in NULL pointer
dereference.
So we bookkeep the number of queues in xen-netback to solve this
problem. This fixes a regression introduced by multiqueue patchset in
3.16-rc1.
There's another bug in original code that the real number of RX queues
is never set. In current Xen multiqueue design, the number of TX queues
and RX queues are in fact the same. We need to set the numbers of TX and
RX queues to the same value.
Also remove xenvif_select_queue and leave queue selection to core
driver, as suggested by David Miller.
Reported-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
CC: Ian Campbell <ian.campbell@citrix.com>
CC: Paul Durrant <paul.durrant@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/hwmon/adm1031.c')
0 files changed, 0 insertions, 0 deletions