Skip to content
Snippets Groups Projects
  1. Feb 08, 2012
    • Jesper Juhl's avatar
      bnx2x: Fix mem leak in bnx2x_tpa_stop() if build_skb() fails. · 3f61cd87
      Jesper Juhl authored
      
      We allocate memory for 'new_data' with kmalloc(). If we get the memory
      we then try to build_skb() and if that should fail (which it can) we
      do not enter 'if (likely(skb)) {' and actually use 'new_data' but
      instead fall through to the 'drop:' label and end up returning from
      the function without ever assigning 'new'data' to anything or freeing
      it. That leaks the memory allocated to 'new_data'.
      
      This patch fixes the memory leak by doing a kfree(new_data) in the
      case where build_skb() fails (or where allocation of 'new_data' itself
      fails, but in taht case it's just a harmless kfree(NULL)).
      
      Signed-off-by: default avatarJesper Juhl <jj@chaosbits.net>
      Acked-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Acked-by: default avatarEilon Greenstein <eilong@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3f61cd87
    • Al Viro's avatar
      CONFIG_TR/CONFIG_LLC: work around the problem with select · da091286
      Al Viro authored
      
      As it is, with PCI/ISA/MCA/CCW all set to n and PCMCIA set to m
      setting TR to y will set LLC to m, with very unpleasant results -
      net/802/psnap gets picked into obj-y, resulting in the kernel
      that won't link - psnap calls functions from llc.  The cause,
      AFAICS, is that kconfig gets rev_dep for LLC containing
      || TR && (deps for TR)
      and even though TR is boolean, both LLC and PCMCIA are tristate
      and that thing becomes || y && (n || m), i.e. || m.  The reason
      for dependency on PCMCIA is that when none of PCI, ISA, MCA, CCW
      or PCMCIA is set there'll be no tokenring drivers, so there's no
      point building tokenring core.  Proper fix probably belongs in
      kconfig (we need strict and, such that y <strict_and> m would be
      y, so that rev_deps added for tristate selected by bool would
      use that instead of &&; we'd have || TR <strict_and> (deps for TR)
      in this case), but it's a rather intrusive change.  There's an
      easy workaround in case of TR -> LLC select, namely to have a def_bool y
      symbol sitting under if TR and have that symbol selecting LLC.
      Kudos to johill for suggesting that one...
      
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      da091286
    • stephen hemminger's avatar
      Revert "skge: check for PCI dma mapping errors" · aadf1f0f
      stephen hemminger authored
      
      As reported by several people...
      
      The code in rx_clean was panic'ing so revert
      commit d0249e44.
      Will redo DMA mapping checks as new patches for a later release.
      
      Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      aadf1f0f
  2. Feb 07, 2012
  3. Feb 06, 2012
  4. Feb 05, 2012
  5. Feb 04, 2012
  6. Feb 03, 2012
  7. Feb 02, 2012