1. 09 Feb, 2009 4 commits
    • Risto Suominen's avatar
      de2104x: force correct order when writing to rx ring · b991d2bc
      Risto Suominen authored
      DescOwn should not be set, thus allowing the chip to use the
      descriptor, before everything else is set up correctly.
      Signed-off-by: default avatarRisto Suominen <Risto.Suominen@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b991d2bc
    • Alex Williamson's avatar
      tun: Fix unicast filter overflow · cfbf84fc
      Alex Williamson authored
      Tap devices can make use of a small MAC filter set via the
      TUNSETTXFILTER ioctl.  The filter has a set of exact matches
      plus a hash for imperfect filtering of additional multicast
      addresses.  The current code is unbalanced, adding unicast
      addresses to the multicast hash, but only checking the hash
      against multicast addresses.  This results in the filter
      dropping unicast addresses that overflow the exact filter.
      The fix is simply to disable the filter by leaving count set
      to zero if we find non-multicast addresses after the exact
      match table is filled.
      Signed-off-by: default avatarAlex Williamson <alex.williamson@hp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cfbf84fc
    • Julia Lawall's avatar
      drivers/isdn: introduce missing kfree · 23b904f3
      Julia Lawall authored
      Error handling code following a kmalloc should free the allocated data.
      
      The semantic match that finds the problem is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @r exists@
      local idexpression x;
      statement S;
      expression E;
      identifier f,l;
      position p1,p2;
      expression *ptr != NULL;
      @@
      
      (
      if ((x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...)) == NULL) S
      |
      x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
      ...
      if (x == NULL) S
      )
      <... when != x
           when != if (...) { <+...x...+> }
      x->f = E
      ...>
      (
       return \(0\|<+...x...+>\|ptr\);
      |
       return@p2 ...;
      )
      
      @script:python@
      p1 << r.p1;
      p2 << r.p2;
      @@
      
      print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      23b904f3
    • Julia Lawall's avatar
      drivers/atm: introduce missing kfree · bc111d57
      Julia Lawall authored
      Error handling code following a kmalloc should free the allocated data.
      
      The semantic match that finds the problem is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @r exists@
      local idexpression x;
      statement S;
      expression E;
      identifier f,l;
      position p1,p2;
      expression *ptr != NULL;
      @@
      
      (
      if ((x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...)) == NULL) S
      |
      x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
      ...
      if (x == NULL) S
      )
      <... when != x
           when != if (...) { <+...x...+> }
      x->f = E
      ...>
      (
       return \(0\|<+...x...+>\|ptr\);
      |
       return@p2 ...;
      )
      
      @script:python@
      p1 << r.p1;
      p2 << r.p2;
      @@
      
      print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bc111d57
  2. 07 Feb, 2009 7 commits
  3. 06 Feb, 2009 3 commits
  4. 05 Feb, 2009 7 commits
  5. 04 Feb, 2009 2 commits
    • Reinette Chatre's avatar
      iwlwifi: save PCI state before suspend, restore after resume · c4e061ac
      Reinette Chatre authored
      This is the right thing to do and fixes the following warning:
      
      [  115.012278] ------------[ cut here ]------------
      [  115.012281] WARNING: at drivers/pci/pci-driver.c:370
      pci_legacy_suspend+0x85/0xc2()
      [  115.012285] Hardware name: Latitude D630
      [  115.012301] PCI PM: Device state not saved by
      iwl3945_pci_suspend+0x0/0x4c [iwl3945]
      [  115.012304] Modules linked in: fuse nfsd lockd nfs_acl auth_rpcgss
      exportfs sunrpc ipv6 acpi_cpufreq kvm_intel kvm snd_hda_codec_idt
      snd_hda_intel snd_hda_codec snd_hwdep arc4 snd_seq_device snd_pcm_oss
      snd_mixer_oss ecb snd_pcm cryptomgr aead snd_timer crypto_blkcipher
      snd snd_page_alloc ohci1394 crypto_hash crypto_algapi ch341 ieee1394
      usbserial thermal iwl3945 mac80211 led_class lib80211 tg3 processor
      i2c_i801 i2c_core sg cfg80211 libphy usbhid battery ac button sr_mod
      cdrom evdev dcdbas ata_generic ata_piix libata sd_mod scsi_mod ext3
      jbd mbcache uhci_hcd ohci_hcd ehci_hcd usbcore [last unloaded:
      microcode]
      [  115.012374] Pid: 4163, comm: pm-suspend Not tainted
      2.6.29-rc3-00227-gf1dd849-dirty #67
      [  115.012377] Call Trace:
      [  115.012382]  [<ffffffff8023d04d>] warn_slowpath+0xb1/0xed
      [  115.012387]  [<ffffffff80450b5e>] ? _spin_unlock_irqrestore+0x5c/0x78
      [  115.012390]  [<ffffffff80254f08>] ? up+0x34/0x39
      [  115.012394]  [<ffffffff80362319>] ? acpi_ut_release_mutex+0x5d/0x61
      [  115.012397]  [<ffffffff803584b2>] ? acpi_get_data+0x5e/0x70
      [  115.012400]  [<ffffffff80363dd9>] ? acpi_bus_get_device+0x25/0x39
      [  115.012403]  [<ffffffff80363e98>] ? acpi_bus_power_manageable+0x11/0x29
      [  115.012406]  [<ffffffff803462f7>] ? acpi_pci_power_manageable+0x17/0x19
      [  115.012410]  [<ffffffff8033ddfd>] ? pci_set_power_state+0xcc/0x101
      [  115.012418]  [<ffffffffa01f28e9>] ? iwl3945_pci_suspend+0x0/0x4c [iwl3945]
      [  115.012422]  [<ffffffff803401e6>] pci_legacy_suspend+0x85/0xc2
      [  115.012425]  [<ffffffff80340316>] pci_pm_suspend+0x34/0x86
      [  115.012429]  [<ffffffff8039d7ce>] pm_op+0x52/0xe5
      [  115.012432]  [<ffffffff8039dd78>] device_suspend+0x32a/0x451
      [  115.012436]  [<ffffffff80269ec2>] suspend_devices_and_enter+0x3e/0x13a
      [  115.012439]  [<ffffffff8026a128>] enter_state+0x110/0x164
      [  115.012442]  [<ffffffff8026a233>] state_store+0xb7/0xd7
      [  115.012446]  [<ffffffff8032f95f>] kobj_attr_store+0x17/0x19
      [  115.012449]  [<ffffffff80307d64>] sysfs_write_file+0xe4/0x119
      [  115.012453]  [<ffffffff802baa7a>] vfs_write+0xae/0x137
      [  115.012456]  [<ffffffff802babc7>] sys_write+0x47/0x70
      [  115.012459]  [<ffffffff8020b73a>] system_call_fastpath+0x16/0x1b
      [  115.012467] ---[ end trace 829828966f6f24dc ]---
      Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
      Tested-by: default avatarMing Lei <tom.leiming@gmail.com>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      c4e061ac
    • Reinette Chatre's avatar
      iwlwifi: clean key table in iwl_clear_stations_table · 5e46882e
      Reinette Chatre authored
      Cleans uCode key table bit map iwl_clear_stations_table
      since all stations are cleared also the key table must be.
      
      Since the keys are not removed properly on suspend by mac80211
      this may result in exhausting key table on resume leading
      to memory corruption during removal
      Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
      Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      5e46882e
  6. 03 Feb, 2009 17 commits