Skip to content
  1. May 12, 2012
  2. May 11, 2012
    • Jiri Bohac's avatar
      bonding: don't increase rx_dropped after processing LACPDUs · 13a8e0c8
      Jiri Bohac authored
      Since commit 3aba891d
      
      , bonding processes LACP frames (802.3ad
      mode) with bond_handle_frame(). Currently a copy of the skb is
      made and the original is left to be processed by other
      rx_handlers and the rest of the network stack by returning
      RX_HANDLER_ANOTHER.  As there is no protocol handler for
      PKT_TYPE_LACPDU, the frame is dropped and dev->rx_dropped
      increased.
      
      Fix this by making bond_handle_frame() return RX_HANDLER_CONSUMED
      if bonding has processed the LACP frame.
      
      Signed-off-by: default avatarJiri Bohac <jbohac@suse.cz>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      13a8e0c8
    • Eric W. Biederman's avatar
      connector/userns: replace netlink uses of cap_raised() with capable() · 38bf1953
      Eric W. Biederman authored
      
      
      In 2009 Philip Reiser notied that a few users of netlink connector
      interface needed a capability check and added the idiom
      cap_raised(nsp->eff_cap, CAP_SYS_ADMIN) to a few of them, on the premise
      that netlink was asynchronous.
      
      In 2011 Patrick McHardy noticed we were being silly because netlink is
      synchronous and removed eff_cap from the netlink_skb_params and changed
      the idiom to cap_raised(current_cap(), CAP_SYS_ADMIN).
      
      Looking at those spots with a fresh eye we should be calling
      capable(CAP_SYS_ADMIN).  The only reason I can see for not calling capable
      is that it once appeared we were not in the same task as the caller which
      would have made calling capable() impossible.
      
      In the initial user_namespace the only difference between between
      cap_raised(current_cap(), CAP_SYS_ADMIN) and capable(CAP_SYS_ADMIN) are a
      few sanity checks and the fact that capable(CAP_SYS_ADMIN) sets
      PF_SUPERPRIV if we use the capability.
      
      Since we are going to be using root privilege setting PF_SUPERPRIV seems
      the right thing to do.
      
      The motivation for this that patch is that in a child user namespace
      cap_raised(current_cap(),...) tests your capabilities with respect to that
      child user namespace not capabilities in the initial user namespace and
      thus will allow processes that should be unprivielged to use the kernel
      services that are only protected with cap_raised(current_cap(),..).
      
      To fix possible user_namespace issues and to just clean up the code
      replace cap_raised(current_cap(), CAP_SYS_ADMIN) with
      capable(CAP_SYS_ADMIN).
      
      Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: Philipp Reisner <philipp.reisner@linbit.com>
      Acked-by: default avatarSerge E. Hallyn <serge.hallyn@canonical.com>
      Acked-by: default avatarAndrew G. Morgan <morgan@kernel.org>
      Cc: Vasiliy Kulikov <segoon@openwall.com>
      Cc: David Howells <dhowells@redhat.com>
      Reviewed-by: default avatarJames Morris <james.l.morris@oracle.com>
      Cc: David Miller <davem@davemloft.net>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      38bf1953
    • Nicolas Dichtel's avatar
      sctp: check cached dst before using it · e0268868
      Nicolas Dichtel authored
      
      
      dst_check() will take care of SA (and obsolete field), hence
      IPsec rekeying scenario is taken into account.
      
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Acked-by: default avatarVlad Yaseivch <vyasevich@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e0268868
    • Eric Dumazet's avatar
      pktgen: fix crash at module unload · c57b5468
      Eric Dumazet authored
      commit 7d3d43da
      
       (net: In unregister_netdevice_notifier unregister
      the netdevices.) makes pktgen crashing at module unload.
      
      [  296.820578] BUG: spinlock bad magic on CPU#6, rmmod/3267
      [  296.820719]  lock: ffff880310c38000, .magic: ffff8803, .owner: <none>/-1, .owner_cpu: -1
      [  296.820943] Pid: 3267, comm: rmmod Not tainted 3.4.0-rc5+ #254
      [  296.821079] Call Trace:
      [  296.821211]  [<ffffffff8168a715>] spin_dump+0x8a/0x8f
      [  296.821345]  [<ffffffff8168a73b>] spin_bug+0x21/0x26
      [  296.821507]  [<ffffffff812b4741>] do_raw_spin_lock+0x131/0x140
      [  296.821648]  [<ffffffff8169188e>] _raw_spin_lock+0x1e/0x20
      [  296.821786]  [<ffffffffa00cc0fd>] __pktgen_NN_threads+0x4d/0x140 [pktgen]
      [  296.821928]  [<ffffffffa00ccf8d>] pktgen_device_event+0x10d/0x1e0 [pktgen]
      [  296.822073]  [<ffffffff8154ed4f>] unregister_netdevice_notifier+0x7f/0x100
      [  296.822216]  [<ffffffffa00d2a0b>] pg_cleanup+0x48/0x73 [pktgen]
      [  296.822357]  [<ffffffff8109528e>] sys_delete_module+0x17e/0x2a0
      [  296.822502]  [<ffffffff81699652>] system_call_fastpath+0x16/0x1b
      
      Hold the pktgen_thread_lock while splicing pktgen_threads, and test
      pktgen_exiting in pktgen_device_event() to make unload faster.
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c57b5468
    • David S. Miller's avatar
      Revert "net: maintain namespace isolation between vlan and real device" · 59b9997b
      David S. Miller authored
      This reverts commit 8a83a00b
      
      .
      
      It causes regressions for S390 devices, because it does an
      unconditional DST drop on SKBs for vlans and the QETH device
      needs the neighbour entry hung off the DST for certain things
      on transmit.
      
      Arnd can't remember exactly why he even needed this change.
      
      Conflicts:
      
      	drivers/net/macvlan.c
      	net/8021q/vlan_dev.c
      	net/core/dev.c
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      59b9997b
    • Thadeu Lima de Souza Cascardo's avatar
      ehea: fix losing of NEQ events when one event occurred early · 380ec964
      Thadeu Lima de Souza Cascardo authored
      
      
      The NEQ interrupt is only triggered when there was no previous pending
      interrupt. If we request irq handling after an interrupt has occurred,
      we will never get an interrupt until we call H_RESET_EVENTS.
      
      Events seem to be cleared when we first register the NEQ. So, when we
      requested irq handling right after registering it, a possible race with
      an interrupt was much less likely. Now, there is a chance we may lose
      this race and never get any events.
      
      The fix here is to poll and acknowledge any events that might have
      happened right after registering the irq handler.
      
      Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      380ec964
    • Benjamin Poirier's avatar
      igb: fix rtnl race in PM resume path · cfb8c3aa
      Benjamin Poirier authored
      
      
      Since the caller (PM resume code) is not the one holding rtnl, when taking the
      'else' branch rtnl may be released at any moment, thereby defeating the whole
      purpose of this code block.
      
      Signed-off-by: default avatarBenjamin Poirier <bpoirier@suse.de>
      Tested-by: default avatarJeff Pieper <jeffrey.e.pieper@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cfb8c3aa
    • David S. Miller's avatar
      ipv4: Do not use dead fib_info entries. · dccd9ecc
      David S. Miller authored
      
      
      Due to RCU lookups and RCU based release, fib_info objects can
      be found during lookup which have fi->fib_dead set.
      
      We must ignore these entries, otherwise we risk dereferencing
      the parts of the entry which are being torn down.
      
      Reported-by: default avatarYevgen Pronenko <yevgen.pronenko@sonymobile.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dccd9ecc
  3. May 10, 2012
  4. May 09, 2012
  5. May 08, 2012
  6. May 07, 2012
    • Bjørn Mork's avatar
      cdc_ether: Ignore bogus union descriptor for RNDIS devices · 6eddcb4c
      Bjørn Mork authored
      
      
      Some RNDIS devices include a bogus CDC Union descriptor pointing
      to non-existing interfaces.  The RNDIS code is already prepared
      to handle devices without a CDC Union descriptor by hardwiring
      the driver to use interfaces 0 and 1, which is correct for the
      devices with the bogus descriptor as well. So we can reuse the
      existing workaround.
      
      Cc: Markus Kolb <linux-201011@tower-net.de>
      Cc: Iker Salmón San Millán <shaola@esdebian.org>
      Cc: Jonathan Nieder <jrnieder@gmail.com>
      Cc: Oliver Neukum <oliver@neukum.org>
      Cc: 655387@bugs.debian.org
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6eddcb4c
    • Ariel Elior's avatar
      bnx2x: bug fix when loading after SAN boot · 24f06716
      Ariel Elior authored
      
      
      This is a bug fix for an "interface fails to load" issue.
      The issue occurs when bnx2x driver loads after UNDI driver was previously
      loaded over the chip. In such a scenario the UNDI driver is loaded and operates
      in the pre-boot kernel, within its own specific host memory address range.
      When the pre-boot stage is complete, the real kernel is loaded, in a new and
      distinct host memory address range. The transition from pre-boot stage to boot
      is asynchronous from UNDI point of view.
      
      A race condition occurs when UNDI driver triggers a DMAE transaction to valid
      host addresses in the pre-boot stage, when control is diverted to the real
      kernel. This results in access to illegal addresses by our HW as the addresses
      which were valid in the preboot stage are no longer considered valid.
      Specifically, the 'was_error' bit in the pci glue of our device is set. This
      causes all following pci transactions from chip to host to timeout (in
      accordance to the pci spec).
      
      Signed-off-by: default avatarAriel Elior <ariele@broadcom.com>
      Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      24f06716
  7. May 05, 2012
  8. May 04, 2012
  9. May 03, 2012