1. 14 8月, 2011 3 次提交
    • J
      drivers/net/can/sja1000/plx_pci.c: eliminate double free · 951f2f96
      Julia Lawall 提交于
      In this code, the failure_cleanup label calls the function
      plx_pci_del_card, which frees everything in the card->net_dev array.  dev
      is placed in this array immediately after allocation, so the two subsequent
      jumps to failure_cleanup should not also call free_sja1000dev, but the
      second one does.
      
      If plx_pci_check_sja1000 fails, then free_sja1000dev is also called on
      dev.  Because dev is already in the card->net_dev array, this implies that
      when plx_pci_del_card is later called, it may get freed again.  So that
      entry is reset to NULL after the free.
      
      Finally, if there is a problem with one channel, there will be a hole in the
      array.  card->channels counts the number of channels that have succeeded,
      and does not keep track of the index of the largest element in the array
      that is valid.  So the loop in plx_pci_del_card is changed to go up to
      PLX_PCI_MAX_CHAN, which is only 2.
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      951f2f96
    • J
      usbnet/cdc_ncm: Don't use stack variables for DMA · 75bc8ef5
      Josh Boyer 提交于
      The cdc_ncm driver still has a few places where stack variables are
      passed to the cdc_ncm_do_request function.  This triggers a stack trace in
      lib/dma-debug.c if the CONFIG_DEBUG_DMA_API option is set.
      
      Adjust these calls to pass parameters that have been allocated with
      kzalloc.
      Signed-off-by: NJosh Boyer <jwboyer@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      75bc8ef5
    • J
      vmxnet3: Don't enable vlan filters in promiscuous mode. · f6957f88
      Jesse Gross 提交于
      The vmxnet3 driver enables vlan filters if filtering is enabled for
      any vlan.  In promiscuous mode the filter table is cleared to in
      order to disable filtering.  However, if a vlan device is subsequently
      created that vlan will be added to the filter, re-engaging it.  As a
      result, not only do we not see all the vlans in promiscuous mode, we
      don't even see vlans for which a filter was previously created.
      
      CC: Scott J. Goldman <scottjg@vmware.com>
      CC: Shreyas Bhatewara <sbhatewara@vmware.com>
      CC: VMware PV-Drivers <pv-drivers@vmware.com>
      Signed-off-by: NJesse Gross <jesse@nicira.com>
      Signed-off-by: NShreyas N Bhatewara <sbhatewara@vmware.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f6957f88
  2. 13 8月, 2011 14 次提交
  3. 12 8月, 2011 17 次提交
  4. 11 8月, 2011 6 次提交