1. 11 Nov, 2009 10 commits
  2. 09 Nov, 2009 14 commits
  3. 08 Nov, 2009 10 commits
    • Christian Pellegrin's avatar
    • Eric W. Biederman's avatar
      net: Support specifying the network namespace upon device creation. · 81adee47
      Eric W. Biederman authored
      There is no good reason to not support userspace specifying the
      network namespace during device creation, and it makes it easier
      to create a network device and pass it to a child network namespace
      with a well known name.
      
      We have to be careful to ensure that the target network namespace
      for the new device exists through the life of the call.  To keep
      that logic clear I have factored out the network namespace grabbing
      logic into rtnl_link_get_net.
      
      In addtion we need to continue to pass the source network namespace
      to the rtnl_link_ops.newlink method so that we can find the base
      device source network namespace.
      Signed-off-by: default avatarEric W. Biederman <ebiederm@aristanetworks.com>
      Acked-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      81adee47
    • Sebastian Siewior's avatar
      net/fsl_pq_mdio: add module license GPL · 26062897
      Sebastian Siewior authored
      or it will taint the kernel and fail to load becuase
      of_address_to_resource() is GPL only.
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      26062897
    • Wolfgang Grandegger's avatar
      can: fix WARN_ON dump in net/core/rtnetlink.c:rtmsg_ifinfo() · 53a0ef86
      Wolfgang Grandegger authored
      On older kernels, e.g. 2.6.27, a WARN_ON dump in rtmsg_ifinfo()
      is thrown when the CAN device is registered due to insufficient
      skb space, as reported by various users. This patch adds the
      rtnl_link_ops "get_size" to fix the problem. I think this patch
      is required for more recent kernels as well, even if no WARN_ON
      dumps are triggered. Maybe we also need "get_xstats_size" for
      the CAN xstats.
      Signed-off-by: default avatarWolfgang Grandegger <wg@grandegger.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      53a0ef86
    • Joe Perches's avatar
      appletalk/ddp.c: Neaten checksum function · f7a3a1d8
      Joe Perches authored
      atalk_sum_partial can now use the rol16 function in bitops.h
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f7a3a1d8
    • Eric Dumazet's avatar
      ipv6: avoid dev_hold()/dev_put() in rawv6_bind() · fd5c0027
      Eric Dumazet authored
      Using RCU helps not touching device refcount in rawv6_bind()
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fd5c0027
    • Anton Vorontsov's avatar
      gianfar: Fix compiler and sparse warnings · 18294ad1
      Anton Vorontsov authored
      commit fba4ed03 ("gianfar: Add Multiple
      Queue Support") introduced the following warnings:
      
        CHECK   gianfar.c
      gianfar.c:333:8: warning: incorrect type in assignment (different address spaces)
      gianfar.c:333:8:    expected unsigned int [usertype] *baddr
      gianfar.c:333:8:    got unsigned int [noderef] <asn:2>*<noident>
      [... 67 lines skipped ...]
      gianfar.c:2565:3: warning: incorrect type in argument 1 (different type sizes)
      gianfar.c:2565:3:    expected unsigned long const *addr
      gianfar.c:2565:3:    got unsigned int *<noident>
        CC      gianfar.o
      gianfar.c: In function 'gfar_probe':
      gianfar.c:985: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c:985: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c:993: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c:993: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c: In function 'gfar_configure_coalescing':
      gianfar.c:1680: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c:1680: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c:1688: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c:1688: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c: In function 'gfar_poll':
      gianfar.c:2565: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c:2565: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c:2566: warning: passing argument 2 of 'test_bit' from incompatible pointer type
      gianfar.c:2585: warning: passing argument 2 of 'set_bit' from incompatible pointer type
      
      Following warnings left unfixed (looks like sparse doesn't like
      locks in loops, so __acquires/__releases() doesn't help):
      
      gianfar.c:441:40: warning: context imbalance in 'lock_rx_qs': wrong count at exit
      gianfar.c:441:40:    context '<noident>': wanted 0, got 1
      gianfar.c:449:40: warning: context imbalance in 'lock_tx_qs': wrong count at exit
      gianfar.c:449:40:    context '<noident>': wanted 0, got 1
      gianfar.c:458:3: warning: context imbalance in 'unlock_rx_qs': __context__ statement expected different context
      gianfar.c:458:3:    context '<noident>': wanted >= 0, got -1
      gianfar.c:466:3: warning: context imbalance in 'unlock_tx_qs': __context__ statement expected different context
      gianfar.c:466:3:    context '<noident>': wanted >= 0, got -1
      Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      18294ad1
    • Anton Vorontsov's avatar
      fsl_pq_mdio: Fix compiler/sparse warnings (part 2) · 6748f60b
      Anton Vorontsov authored
      This patch fixes following warnings:
      
      fsl_pq_mdio.c:112:38: warning: cast adds address space to expression (<asn:2>)
      fsl_pq_mdio.c:124:38: warning: cast adds address space to expression (<asn:2>)
      fsl_pq_mdio.c:133:38: warning: cast adds address space to expression (<asn:2>)
      fsl_pq_mdio.c:414:11: warning: cast adds address space to expression (<asn:2>)
      
      Instead of adding __force all over the place, introduce convenient
      fsl_pq_mdio_get_regs() call that does the ugly casting just once.
      Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6748f60b
    • Anton Vorontsov's avatar
      fsl_pq_mdio: Fix compiler/sparse warnings (part 1) · 2951d64e
      Anton Vorontsov authored
      commit 1d2397d7 ("fsl_pq_mdio: Add
      Suport for etsec2.0 devices") introduced the following warnings:
      
        CHECK   fsl_pq_mdio.c
      fsl_pq_mdio.c:287:22: warning: incorrect type in initializer (different base types)
      fsl_pq_mdio.c:287:22:    expected unknown type 11 const *__mptr
      fsl_pq_mdio.c:287:22:    got unsigned long long [unsigned] [assigned] [usertype] addr
      fsl_pq_mdio.c:287:19: warning: incorrect type in assignment (different base types)
      fsl_pq_mdio.c:287:19:    expected unsigned long long [unsigned] [usertype] ioremap_miimcfg
      fsl_pq_mdio.c:287:19:    got struct fsl_pq_mdio *<noident>
        CC      fsl_pq_mdio.o
      fsl_pq_mdio.c: In function 'fsl_pq_mdio_probe':
      fsl_pq_mdio.c:287: warning: initialization makes pointer from integer without a cast
      fsl_pq_mdio.c:287: warning: assignment makes integer from pointer without a cast
      
      These warnings are not easy to fix without ugly __force casts. So,
      instead of introducing the casts, rework the code to substitute an
      offset from an already mapped area. This makes the code a lot simpler
      and less duplicated.
      
      Plus, from now on we don't actually map reserved registers on
      non-etsec2.0 devices, so we have more chances to catch programming
      errors.
      Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2951d64e
    • Eric Dumazet's avatar
      can: should not use __dev_get_by_index() without locks · 6755aeba
      Eric Dumazet authored
      bcm_proc_getifname() is called with RTNL and dev_base_lock
      not held. It calls __dev_get_by_index() without locks, and
      this is illegal (might crash)
      
      Close the race by holding dev_base_lock and copying dev->name
      in the protected section.
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarOliver Hartkopp <oliver@hartkopp.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6755aeba
  4. 07 Nov, 2009 6 commits
    • Eric Dumazet's avatar
      rtnetlink: Cleanups · e0d087af
      Eric Dumazet authored
      Pure cleanups patch
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e0d087af
    • Arnd Bergmann's avatar
      net: kill proto_ops wrapper · b215c57d
      Arnd Bergmann authored
      All users of wrapped proto_ops are now gone, so we can safely remove
      the wrappers as well.
      
      Cc: David S. Miller <davem@davemloft.net>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b215c57d
    • Arnd Bergmann's avatar
      net/x25: push BKL usage into x25_proto · 91774904
      Arnd Bergmann authored
      The x25 driver uses lock_kernel() implicitly through
      its proto_ops wrapper. The makes the usage explicit
      in order to get rid of that wrapper and to better document
      the usage of the BKL.
      
      The next step should be to get rid of the usage of the BKL
      in x25 entirely, which requires understanding what data
      structures need serialized accesses.
      
      Cc: Henner Eisen <eis@baty.hanse.de>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: linux-x25@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      91774904
    • Arnd Bergmann's avatar
      net/irda: push BKL into proto_ops · 58a9d732
      Arnd Bergmann authored
      The irda driver uses the BKL implicitly in its protocol
      operations. Replace the wrapped proto_ops with explicit
      lock_kernel() calls makes the usage more obvious and
      shrinks the size of the object code.
      
      The calls t lock_kernel() should eventually all be replaced
      by other serialization methods, which requires finding out
      
      The calls t lock_kernel() should eventually all be replaced
      by other serialization methods, which requires finding out
      which data actually needs protection.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      58a9d732
    • Arnd Bergmann's avatar
      net/ipx: push down BKL into a ipx_dgram_ops · 83927ba0
      Arnd Bergmann authored
      Making the BKL usage explicit in ipx makes it more
      obvious where it is used, reduces code size and helps
      getting rid of the BKL in common code.
      
      I did not analyse how to kill lock_kernel from ipx
      entirely, this will involve either proving that it's not
      needed, or replacing with a proper mutex or spinlock,
      after finding out which data structures are protected
      by the lock.
      
      Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Stephen Hemminger <shemminger@vyatta.com>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      83927ba0
    • Arnd Bergmann's avatar
      net/appletalk: push down BKL into a atalk_dgram_ops · ecced8ba
      Arnd Bergmann authored
      Making the BKL usage explicit in appletalk makes it more
      obvious where it is used, reduces code size and helps
      getting rid of the BKL in common code.
      
      I did not analyse how to kill lock_kernel from appletalk
      entirely, this will involve either proving that it's not
      needed, or replacing with a proper mutex or spinlock,
      after finding out which data structures are protected
      by the lock.
      
      Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Stephen Hemminger <shemminger@vyatta.com>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ecced8ba