1. 15 9月, 2007 3 次提交
    • Y
    • J
      [NET_SCHED] protect action config/dump from irqs · e1e992e5
      Jamal Hadi Salim 提交于
      (with no apologies to C Heston)
      
      On Mon, 2007-10-09 at 21:00 +0800, Herbert Xu wrote:
      On Sun, Sep 02, 2007 at 01:11:29PM +0000, Christian Kujau wrote:
      > >
      > > after upgrading to 2.6.23-rc5 (and applying davem's fix [0]), lockdep
      > > was quite noisy when I tried to shape my external (wireless) interface:
      > >
      > > [ 6400.534545] FahCore_78.exe/3552 just changed the state of lock:
      > > [ 6400.534713]  (&dev->ingress_lock){-+..}, at: [<c038d595>]
      > > netif_receive_skb+0x2d5/0x3c0
      > > [ 6400.534941] but this lock took another, soft-read-irq-unsafe lock in the
      > > past:
      > > [ 6400.535145]  (police_lock){-.--}
      >
      > This is a genuine dead-lock.  The police lock can be taken
      > for reading with softirqs on.  If a second CPU tries to take
      > the police lock for writing, while holding the ingress lock,
      > then a softirq on the first CPU can dead-lock when it tries
      > to get the ingress lock.
      Signed-off-by: NJamal Hadi Salim <hadi@cyberus.ca>
      Acked-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e1e992e5
    • D
      [NET]: Fix two issues wrt. SO_BINDTODEVICE. · 4878809f
      David S. Miller 提交于
      1) Comments suggest that setting optlen to zero will unbind
         the socket from whatever device it might be attached to.  This
         hasn't been the case since at least 2.2.x because the first thing
         this function does is return -EINVAL if 'optlen' is less than
         sizeof(int).
      
         This check also means that passing in a two byte string doesn't
         work so well.  It's almost as if this code was testing with "eth?"
         patterned strings and nothing else :-)
      
         Fix this by breaking the logic of this facility out into a
         seperate function which validates optlen more appropriately.
      
         The optlen==0 and small string cases now work properly.
      
      2) We should reset the cached route of the socket after we have made
         the device binding changes, not before.
      
      Reported by Ben Greear.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4878809f
  2. 13 9月, 2007 15 次提交
  3. 12 9月, 2007 22 次提交