1. 01 3月, 2007 9 次提交
    • P
      [NET]: Handle disabled preemption in gfp_any() · 4498121c
      Patrick McHardy 提交于
      ctnetlink uses netlink_unicast from an atomic_notifier_chain
      (which is called within a RCU read side critical section)
      without holding further locks. netlink_unicast calls netlink_trim
      with the result of gfp_any() for the gfp flags, which are passed
      down to pskb_expand_header. gfp_any() only checks for softirq
      context and returns GFP_KERNEL, resulting in this warning:
      
      BUG: sleeping function called from invalid context at mm/slab.c:3032
      in_atomic():1, irqs_disabled():0
      no locks held by rmmod/7010.
      
      Call Trace:
       [<ffffffff8109467f>] debug_show_held_locks+0x9/0xb
       [<ffffffff8100b0b4>] __might_sleep+0xd9/0xdb
       [<ffffffff810b5082>] __kmalloc+0x68/0x110
       [<ffffffff811ba8f2>] pskb_expand_head+0x4d/0x13b
       [<ffffffff81053147>] netlink_broadcast+0xa5/0x2e0
       [<ffffffff881cd1d7>] :nfnetlink:nfnetlink_send+0x83/0x8a
       [<ffffffff8834f6a6>] :nf_conntrack_netlink:ctnetlink_conntrack_event+0x94c/0x96a
       [<ffffffff810624d6>] notifier_call_chain+0x29/0x3e
       [<ffffffff8106251d>] atomic_notifier_call_chain+0x32/0x60
       [<ffffffff881d266d>] :nf_conntrack:destroy_conntrack+0xa5/0x1d3
       [<ffffffff881d194e>] :nf_conntrack:nf_ct_cleanup+0x8c/0x12c
       [<ffffffff881d4614>] :nf_conntrack:kill_l3proto+0x0/0x13
       [<ffffffff881d482a>] :nf_conntrack:nf_conntrack_l3proto_unregister+0x90/0x94
       [<ffffffff883551b3>] :nf_conntrack_ipv4:nf_conntrack_l3proto_ipv4_fini+0x2b/0x5d
       [<ffffffff8109d44f>] sys_delete_module+0x1b5/0x1e6
       [<ffffffff8105f245>] trace_hardirqs_on_thunk+0x35/0x37
       [<ffffffff8105911e>] system_call+0x7e/0x83
      
      Since netlink_unicast is supposed to be callable from within RCU
      read side critical sections, make gfp_any() check for in_atomic()
      instead of in_softirq().
      
      Additionally nfnetlink_send needs to use gfp_any() as well for the
      call to netlink_broadcast).
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4498121c
    • S
      [BRIDGE]: Fix locking of set path cost. · 6548cda2
      Stephen Hemminger 提交于
      This change goes with earlier change to get rid of
      work queue for path cost. Now stp_set_path_cost does its own
      locking. This is to allow it to call br_path_cost() which calls
      ethtool interfaces (might sleep).
      Signed-off-by: NStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6548cda2
    • D
      [IPV6]: /proc/net/anycast6 unbalanced inet6_dev refcnt · aa6e4a96
      David Stevens 提交于
      Reading /proc/net/anycast6 when there is no anycast address
      on an interface results in an ever-increasing inet6_dev reference
      count, as well as a reference to the netdevice you can't get rid of.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      aa6e4a96
    • R
      [IPX]: Remove ancient changelog · 1267cd76
      Rolf Eike Beer 提交于
      Signed-off-by: NRolf Eike Beer <eike-kernel@sf-tec.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1267cd76
    • R
      [IPX]: Remove outdated information from Kconfig · ff49f26b
      Rolf Eike Beer 提交于
      SPX was removed in early 2.5. How to connect to a Mac or the other OS isn't
      hard to find out these days.
      Signed-off-by: NRolf Eike Beer <eike-kernel@sf-tec.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ff49f26b
    • D
      [NET]: Revert socket.h/stat.h ifdef hacks. · 304c209c
      David S. Miller 提交于
      This reverts 57a87bb0.
      
      As H. Peter Anvin states, this change broke klibc and it's
      not very easy to fix things up without duplicating everything
      into userspace.
      
      In the longer term we should have a better solution to this
      problem, but for now let's unbreak things.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      304c209c
    • M
      [IPV6]: anycast refcnt fix · 2c12a74c
      Michal Wrobel 提交于
      This patch fixes a bug in Linux IPv6 stack which caused anycast address
      to be added to a device prior DAD has been completed. This led to
      incorrect reference count which resulted in infinite wait for
      unregister_netdevice completion on interface removal.
      Signed-off-by: NMichal Wrobel <xmxwx@asn.pl>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2c12a74c
    • D
      [XFRM] xfrm_user: Fix return values of xfrm_add_sa_expire. · 3a765aa5
      David S. Miller 提交于
      As noted by Kent Yoder, this function will always return an
      error.  Make sure it returns zero on success.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3a765aa5
    • E
      [PATCH] x86_64/i386 irq: Fix !CONFIG_SMP compilation · 2ff7354f
      Eric W. Biederman 提交于
      When removing set_native_irq I missed the fact that it was
      called in a couple of places that were compiled even when
      SMP support is disabled.  And since the irq_desc[].affinity
      field only exists in SMP things broke.
      
      Thanks to Simon Arlott <simon@arlott.org> for spotting this.
      
      There are a couple of ways to fix this but the simplest one
      is to just remove the assignments.  The affinity field is only
      used to display a value to the user, and nothing on either i386
      or x86_64 reads it or depends on it being any particlua value,
      so skipping the assignment is safe.  The assignment that
      is being removed is just for the initial affinity value before
      the user explicitly sets it.  The irq_desc array initializes
      this field to CPU_MASK_ALL so the field is initialized to
      a reasonable value in the SMP case without being set.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2ff7354f
  2. 28 2月, 2007 2 次提交
    • L
      Linux 2.6.21-rc2 · 606135a3
      Linus Torvalds 提交于
      Too many changes for comfort since -rc1.  Some missed merges, and some
      just annoyingly big fixes since.  This is not how an -rc2 should look.
      Need to really calm things down!
      606135a3
    • D
      [SPARC64]: Fix PCI interrupts on E450 et al. · bb4c18cb
      David S. Miller 提交于
      When the PCI controller OBP node lacks an interrupt-map
      and interrupt-map-mask property, we need to form the
      INO by hand.  The PCI swizzle logic was not doing that
      properly.
      
      This was a regression added by the of_device code.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bb4c18cb
  3. 27 2月, 2007 29 次提交