1. 13 Apr, 2011 1 commit
  2. 12 Apr, 2011 12 commits
    • Neil Turton's avatar
      sfc: Use rmb() to ensure reads occur in order · fcfa0604
      Neil Turton authored
      Enabling write-combining may also enable read reordering.  The BIU is
      only guaranteed to read from a 128-bit CSR or 64-bit SRAM word when
      the host reads from its lowest address; otherwise the BIU may use the
      latched value.  Therefore we need to reinstate the read memory
      barriers after the first read operation for each CSR or SRAM word.
      
      Signed-off-by; Ben Hutchings <bhutchings@solarflare.com>
      fcfa0604
    • David S. Miller's avatar
      ieee802154: Remove hacked CFLAGS in net/ieee802154/Makefile · bfac3693
      David S. Miller authored
      It adds -Wall (which the kernel carefully controls already) and of all
      things -DDEBUG (which should be set by other means if desired, please
      we have dynamic-debug these days).
      
      Kill this noise.
      Reported-by: default avatarDave Jones <davej@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bfac3693
    • Dave Jones's avatar
      irda: fix locking unbalance in irda_sendmsg · 020318d0
      Dave Jones authored
      5b40964e ("irda: Remove BKL instances
      from af_irda.c") introduced a path where we have a locking unbalance.
      If we pass invalid flags, we unlock a socket we never locked,
      resulting in this...
      
      =====================================
      [ BUG: bad unlock balance detected! ]
      -------------------------------------
      trinity/20101 is trying to release lock (sk_lock-AF_IRDA) at:
      [<ffffffffa057f001>] irda_sendmsg+0x207/0x21d [irda]
      but there are no more locks to release!
      
      other info that might help us debug this:
      no locks held by trinity/20101.
      
      stack backtrace:
      Pid: 20101, comm: trinity Not tainted 2.6.39-rc3+ #3
      Call Trace:
       [<ffffffffa057f001>] ? irda_sendmsg+0x207/0x21d [irda]
       [<ffffffff81085041>] print_unlock_inbalance_bug+0xc7/0xd2
       [<ffffffffa057f001>] ? irda_sendmsg+0x207/0x21d [irda]
       [<ffffffff81086aca>] lock_release+0xcf/0x18e
       [<ffffffff813ed190>] release_sock+0x2d/0x155
       [<ffffffffa057f001>] irda_sendmsg+0x207/0x21d [irda]
       [<ffffffff813e9f8c>] __sock_sendmsg+0x69/0x75
       [<ffffffff813ea105>] sock_sendmsg+0xa1/0xb6
       [<ffffffff81100ca3>] ? might_fault+0x5c/0xac
       [<ffffffff81086b7c>] ? lock_release+0x181/0x18e
       [<ffffffff81100cec>] ? might_fault+0xa5/0xac
       [<ffffffff81100ca3>] ? might_fault+0x5c/0xac
       [<ffffffff81133b94>] ? fcheck_files+0xb9/0xf0
       [<ffffffff813f387a>] ? copy_from_user+0x2f/0x31
       [<ffffffff813f3b70>] ? verify_iovec+0x52/0xa6
       [<ffffffff813eb4e3>] sys_sendmsg+0x23a/0x2b8
       [<ffffffff81086b7c>] ? lock_release+0x181/0x18e
       [<ffffffff810773c6>] ? up_read+0x28/0x2c
       [<ffffffff814bec3d>] ? do_page_fault+0x360/0x3b4
       [<ffffffff81087043>] ? trace_hardirqs_on_caller+0x10b/0x12f
       [<ffffffff810458aa>] ? finish_task_switch+0xb2/0xe3
       [<ffffffff8104583e>] ? finish_task_switch+0x46/0xe3
       [<ffffffff8108364a>] ? trace_hardirqs_off_caller+0x33/0x90
       [<ffffffff814bbaf9>] ? retint_swapgs+0x13/0x1b
       [<ffffffff81087043>] ? trace_hardirqs_on_caller+0x10b/0x12f
       [<ffffffff810a9dd3>] ? audit_syscall_entry+0x11c/0x148
       [<ffffffff8125609e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
       [<ffffffff814c22c2>] system_call_fastpath+0x16/0x1b
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      020318d0
    • Otavio Salvador's avatar
      3d894a9c
    • Otavio Salvador's avatar
    • Patrick McHardy's avatar
      connector: fix skb double free in cn_rx_skb() · 0e087858
      Patrick McHardy authored
      When a skb is delivered to a registered callback, cn_call_callback()
      incorrectly returns -ENODEV after freeing the skb, causing cn_rx_skb()
      to free the skb a second time.
      Reported-by: default avatarEric B Munson <emunson@mgebm.net>
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      Tested-by: default avatarEric B Munson <emunson@mgebm.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0e087858
    • Joakim Tjernlund's avatar
      net: Do not wrap sysctl igmp_max_memberships in IP_MULTICAST · 192910a6
      Joakim Tjernlund authored
      controlling igmp_max_membership is useful even when IP_MULTICAST
      is off.
      Quagga(an OSPF deamon) uses multicast addresses for all interfaces
      using a single socket and hits igmp_max_membership limit when
      there are 20 interfaces or more.
      Always export sysctl igmp_max_memberships in proc, just like
      igmp_max_msf
      Signed-off-by: default avatarJoakim Tjernlund <Joakim.Tjernlund@transmode.se>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      192910a6
    • Eric Dumazet's avatar
      inetpeer: reduce stack usage · 66944e1c
      Eric Dumazet authored
      On 64bit arches, we use 752 bytes of stack when cleanup_once() is called
      from inet_getpeer().
      
      Lets share the avl stack to save ~376 bytes.
      
      Before patch :
      
      # objdump -d net/ipv4/inetpeer.o | scripts/checkstack.pl
      
      0x000006c3 unlink_from_pool [inetpeer.o]:		376
      0x00000721 unlink_from_pool [inetpeer.o]:		376
      0x00000cb1 inet_getpeer [inetpeer.o]:			376
      0x00000e6d inet_getpeer [inetpeer.o]:			376
      0x0004 inet_initpeers [inetpeer.o]:			112
      # size net/ipv4/inetpeer.o
         text	   data	    bss	    dec	    hex	filename
         5320	    432	     21	   5773	   168d	net/ipv4/inetpeer.o
      
      After patch :
      
      objdump -d net/ipv4/inetpeer.o | scripts/checkstack.pl
      0x00000c11 inet_getpeer [inetpeer.o]:			376
      0x00000dcd inet_getpeer [inetpeer.o]:			376
      0x00000ab9 peer_check_expire [inetpeer.o]:		328
      0x00000b7f peer_check_expire [inetpeer.o]:		328
      0x0004 inet_initpeers [inetpeer.o]:			112
      # size net/ipv4/inetpeer.o
         text	   data	    bss	    dec	    hex	filename
         5163	    432	     21	   5616	   15f0	net/ipv4/inetpeer.o
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Cc: Scot Doyle <lkml@scotdoyle.com>
      Cc: Stephen Hemminger <shemminger@vyatta.com>
      Cc: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
      Reviewed-by: default avatarHiroaki SHIMODA <shimoda.hiroaki@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      66944e1c
    • Eric Dumazet's avatar
      bridge: reset IPCB in br_parse_ip_options · f8e9881c
      Eric Dumazet authored
      Commit 462fb2af (bridge : Sanitize skb before it enters the IP
      stack), missed one IPCB init before calling ip_options_compile()
      
      Thanks to Scot Doyle for his tests and bug reports.
      Reported-by: default avatarScot Doyle <lkml@scotdoyle.com>
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Cc: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
      Acked-by: default avatarBandan Das <bandan.das@stratus.com>
      Acked-by: default avatarStephen Hemminger <shemminger@vyatta.com>
      Cc: Jan Lübbe <jluebbe@debian.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f8e9881c
    • Ben Hutchings's avatar
      sfc: Do not use efx_process_channel_now() in online self-test · d4fabcc8
      Ben Hutchings authored
      During self-tests we use efx_process_channel_now() to handle
      completion and other events synchronously.  This disables interrupts
      and NAPI processing for the channel in question, but it may still be
      interrupted by another channel.  A single socket may receive packets
      from multiple net devices or even multiple channels of the same net
      device, so this can result in deadlock on a socket lock.
      
      Receiving packets in process context will also result in incorrect
      classification by the network cgroup classifier.
      
      Therefore, we must only use efx_process_channel_now() in the offline
      loopback tests (which never deliver packets up the stack) and not for
      the online interrupt and event tests.
      
      For the interrupt test, there is no reason to process events.  We
      only care that an interrupt is raised.
      
      For the event test, we want to know whether events have been received,
      and there may be many events ahead of the one we inject.  Therefore
      remove efx_channel::magic_count and instead test whether
      efx_channel::eventq_read_ptr advances.  This is currently an event
      queue index and might wrap around to exactly the same value, resulting
      in a false negative.  Therefore move the masking to efx_event() and
      efx_nic_eventq_read_ack() so that it cannot wrap within the time of
      the test.
      
      The event test also tries to diagnose failures by checking whether an
      event was delivered without causing an interrupt.  Add and use a
      helper function that only does this.
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      d4fabcc8
    • Neil Turton's avatar
      sfc: Stop the TX queues during loopback self-tests · 9d1aea62
      Neil Turton authored
      If the TX queues are running during loopback self tests, host
      traffic gets looped back which causes the test to fail.  Avoid
      restarting the TX queues after the port reset so that any packets
      sent by the host get held back until after the tests have completed.
      
      [bwh: Also wake all TX queues at the end of self-tests.]
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      9d1aea62
    • David S. Miller's avatar
      llc: Fix length check in llc_fixup_skb(). · aa867359
      David S. Miller authored
      Fixes bugzilla #32872
      
      The LLC stack pretends to support non-linear skbs but there is a
      direct use of skb_tail_pointer() in llc_fixup_skb().
      
      Use pskb_may_pull() to see if data_size bytes remain and can be
      accessed linearly in the packet, instead of direct pointer checks.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      aa867359
  3. 11 Apr, 2011 16 commits
  4. 10 Apr, 2011 1 commit
  5. 09 Apr, 2011 3 commits
  6. 08 Apr, 2011 7 commits