1. 29 9月, 2009 1 次提交
  2. 26 9月, 2009 1 次提交
  3. 23 9月, 2009 1 次提交
  4. 18 6月, 2009 1 次提交
  5. 17 6月, 2009 1 次提交
  6. 28 3月, 2009 1 次提交
  7. 22 3月, 2009 2 次提交
  8. 10 3月, 2009 1 次提交
  9. 01 2月, 2009 1 次提交
  10. 14 11月, 2008 1 次提交
  11. 07 10月, 2008 1 次提交
  12. 20 7月, 2008 1 次提交
  13. 17 6月, 2008 1 次提交
    • D
      ax25: Use sock_graft() and remove bogus sk_socket and sk_sleep init. · 9375cb8a
      David S. Miller 提交于
      The way that listening sockets work in ax25 is that the packet input
      code path creates new socks via ax25_make_new() and attaches them
      to the incoming SKB.  This SKB gets queued up into the listening
      socket's receive queue.
      
      When accept()'d the sock gets hooked up to the real parent socket.
      Alternatively, if the listening socket is closed and released, any
      unborn socks stuff up in the receive queue get released.
      
      So during this time period these sockets are unreachable in any
      other way, so no wakeup events nor references to their ->sk_socket
      and ->sk_sleep members can occur.  And even if they do, all such
      paths have to make NULL checks.
      
      So do not deceptively initialize them in ax25_make_new() to the
      values in the listening socket.  Leave them at NULL.
      
      Finally, use sock_graft() in ax25_accept().
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9375cb8a
  14. 26 3月, 2008 2 次提交
  15. 13 2月, 2008 2 次提交
    • J
      [AX25] ax25_timer: use mod_timer instead of add_timer · 21fab4a8
      Jarek Poplawski 提交于
      According to one of Jann's OOPS reports it looks like
      BUG_ON(timer_pending(timer)) triggers during add_timer()
      in ax25_start_t1timer(). This patch changes current use
      of: init_timer(), add_timer() and del_timer() to
      setup_timer() with mod_timer(), which should be safer
      anyway.
      Reported-by: NJann Traschewski <jann@gmx.de>
      Signed-off-by: NJarek Poplawski <jarkao2@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      21fab4a8
    • J
      [AX25] af_ax25: remove sock lock in ax25_info_show() · 1105b5d1
      Jarek Poplawski 提交于
      This lockdep warning:
      
      > =======================================================
      > [ INFO: possible circular locking dependency detected ]
      > 2.6.24 #3
      > -------------------------------------------------------
      > swapper/0 is trying to acquire lock:
      >  (ax25_list_lock){-+..}, at: [<f91dd3b1>] ax25_destroy_socket+0x171/0x1f0 [ax25]
      >
      > but task is already holding lock:
      >  (slock-AF_AX25){-+..}, at: [<f91dbabc>] ax25_std_heartbeat_expiry+0x1c/0xe0 [ax25]
      >
      > which lock already depends on the new lock.
      ...
      
      shows that ax25_list_lock and slock-AF_AX25 are taken in different
      order: ax25_info_show() takes slock (bh_lock_sock(ax25->sk)) while
      ax25_list_lock is held, so reversely to other functions. To fix this
      the sock lock should be moved to ax25_info_start(), and there would
      be still problem with breaking ax25_list_lock (it seems this "proper"
      order isn't optimal yet). But, since it's only for reading proc info
      it seems this is not necessary (e.g.  ax25_send_to_raw() does similar
      reading without this lock too).
      
      So, this patch removes sock lock to avoid deadlock possibility; there
      is also used sock_i_ino() function, which reads sk_socket under proper
      read lock. Additionally printf format of this i_ino is changed to %lu.
      Reported-by: NBernard Pidoux F6BVP <f6bvp@free.fr>
      Signed-off-by: NJarek Poplawski <jarkao2@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1105b5d1
  16. 01 2月, 2008 1 次提交
  17. 29 1月, 2008 2 次提交
    • E
      [AX25]: sparse cleanups · f16f3026
      Eric Dumazet 提交于
      net/ax25/ax25_route.c:251:13: warning: context imbalance in
      'ax25_rt_seq_start' - wrong count at exit
      net/ax25/ax25_route.c:276:13: warning: context imbalance in 'ax25_rt_seq_stop'
      - unexpected unlock
      net/ax25/ax25_std_timer.c:65:25: warning: expensive signed divide
      net/ax25/ax25_uid.c:46:1: warning: symbol 'ax25_uid_list' was not declared.
      Should it be static?
      net/ax25/ax25_uid.c:146:13: warning: context imbalance in 'ax25_uid_seq_start'
      - wrong count at exit
      net/ax25/ax25_uid.c:169:13: warning: context imbalance in 'ax25_uid_seq_stop'
      - unexpected unlock
      net/ax25/af_ax25.c:573:28: warning: expensive signed divide
      net/ax25/af_ax25.c:1865:13: warning: context imbalance in 'ax25_info_start' -
      wrong count at exit
      net/ax25/af_ax25.c:1888:13: warning: context imbalance in 'ax25_info_stop' -
      unexpected unlock
      net/ax25/ax25_ds_timer.c:133:25: warning: expensive signed divide
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f16f3026
    • P
      [NET]: Convert init_timer into setup_timer · b24b8a24
      Pavel Emelyanov 提交于
      Many-many code in the kernel initialized the timer->function
      and  timer->data together with calling init_timer(timer). There
      is already a helper for this. Use it for networking code.
      
      The patch is HUGE, but makes the code 130 lines shorter
      (98 insertions(+), 228 deletions(-)).
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Acked-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b24b8a24
  18. 11 1月, 2008 1 次提交
    • J
      [AX25] af_ax25: Possible circular locking. · ecd2ebde
      Jarek Poplawski 提交于
      Bernard Pidoux F6BVP reported:
      > When I killall kissattach I can see the following message.
      >
      > This happens on kernel 2.6.24-rc5 already patched with the 6 previously
      > patches I sent recently.
      >
      >
      > =======================================================
      > [ INFO: possible circular locking dependency detected ]
      > 2.6.23.9 #1
      > -------------------------------------------------------
      > kissattach/2906 is trying to acquire lock:
      >  (linkfail_lock){-+..}, at: [<d8bd4603>] ax25_link_failed+0x11/0x39 [ax25]
      >
      > but task is already holding lock:
      >  (ax25_list_lock){-+..}, at: [<d8bd7c7c>] ax25_device_event+0x38/0x84
      > [ax25]
      >
      > which lock already depends on the new lock.
      >
      >
      > the existing dependency chain (in reverse order) is:
      ...
      
      lockdep is worried about the different order here:
      
      #1 (rose_neigh_list_lock){-+..}:
      #3 (ax25_list_lock){-+..}:
      
      #0 (linkfail_lock){-+..}:
      #1 (rose_neigh_list_lock){-+..}:
      
      #3 (ax25_list_lock){-+..}:
      #0 (linkfail_lock){-+..}:
      
      So, ax25_list_lock could be taken before and after linkfail_lock. 
      I don't know if this three-thread clutch is very probable (or
      possible at all), but it seems another bug reported by Bernard
      ("[...] system impossible to reboot with linux-2.6.24-rc5")
      could have similar source - namely ax25_list_lock held by
      ax25_kill_by_device() during ax25_disconnect(). It looks like the
      only place which calls ax25_disconnect() this way, so I guess, it
      isn't necessary.
      
      This patch is breaking the lock for ax25_disconnect().
      Reported-and-tested-by: NBernard Pidoux <f6bvp@free.fr>
      Signed-off-by: NJarek Poplawski <jarkao2@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ecd2ebde
  19. 10 1月, 2008 1 次提交
  20. 01 11月, 2007 1 次提交
  21. 11 10月, 2007 4 次提交
    • E
      [NET]: Make the device list and device lookups per namespace. · 881d966b
      Eric W. Biederman 提交于
      This patch makes most of the generic device layer network
      namespace safe.  This patch makes dev_base_head a
      network namespace variable, and then it picks up
      a few associated variables.  The functions:
      dev_getbyhwaddr
      dev_getfirsthwbytype
      dev_get_by_flags
      dev_get_by_name
      __dev_get_by_name
      dev_get_by_index
      __dev_get_by_index
      dev_ioctl
      dev_ethtool
      dev_load
      wireless_process_ioctl
      
      were modified to take a network namespace argument, and
      deal with it.
      
      vlan_ioctl_set and brioctl_set were modified so their
      hooks will receive a network namespace argument.
      
      So basically anthing in the core of the network stack that was
      affected to by the change of dev_base was modified to handle
      multiple network namespaces.  The rest of the network stack was
      simply modified to explicitly use &init_net the initial network
      namespace.  This can be fixed when those components of the network
      stack are modified to handle multiple network namespaces.
      
      For now the ifindex generator is left global.
      
      Fundametally ifindex numbers are per namespace, or else
      we will have corner case problems with migration when
      we get that far.
      
      At the same time there are assumptions in the network stack
      that the ifindex of a network device won't change.  Making
      the ifindex number global seems a good compromise until
      the network stack can cope with ifindex changes when
      you change namespaces, and the like.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      881d966b
    • E
      [NET]: Make device event notification network namespace safe · e9dc8653
      Eric W. Biederman 提交于
      Every user of the network device notifiers is either a protocol
      stack or a pseudo device.  If a protocol stack that does not have
      support for multiple network namespaces receives an event for a
      device that is not in the initial network namespace it quite possibly
      can get confused and do the wrong thing.
      
      To avoid problems until all of the protocol stacks are converted
      this patch modifies all netdev event handlers to ignore events on
      devices that are not in the initial network namespace.
      
      As the rest of the code is made network namespace aware these
      checks can be removed.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e9dc8653
    • E
      [NET]: Make socket creation namespace safe. · 1b8d7ae4
      Eric W. Biederman 提交于
      This patch passes in the namespace a new socket should be created in
      and has the socket code do the appropriate reference counting.  By
      virtue of this all socket create methods are touched.  In addition
      the socket create methods are modified so that they will fail if
      you attempt to create a socket in a non-default network namespace.
      
      Failing if we attempt to create a socket outside of the default
      network namespace ensures that as we incrementally make the network stack
      network namespace aware we will not export functionality that someone
      has not audited and made certain is network namespace safe.
      Allowing us to partially enable network namespaces before all of the
      exotic protocols are supported.
      
      Any protocol layers I have missed will fail to compile because I now
      pass an extra parameter into the socket creation code.
      
      [ Integrated AF_IUCV build fixes from Andrew Morton... -DaveM ]
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1b8d7ae4
    • E
      [NET]: Make /proc/net per network namespace · 457c4cbc
      Eric W. Biederman 提交于
      This patch makes /proc/net per network namespace.  It modifies the global
      variables proc_net and proc_net_stat to be per network namespace.
      The proc_net file helpers are modified to take a network namespace argument,
      and all of their callers are fixed to pass &init_net for that argument.
      This ensures that all of the /proc/net files are only visible and
      usable in the initial network namespace until the code behind them
      has been updated to be handle multiple network namespaces.
      
      Making /proc/net per namespace is necessary as at least some files
      in /proc/net depend upon the set of network devices which is per
      network namespace, and even more files in /proc/net have contents
      that are relevant to a single network namespace.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      457c4cbc
  22. 19 7月, 2007 1 次提交
  23. 11 7月, 2007 1 次提交
  24. 09 5月, 2007 1 次提交
  25. 26 4月, 2007 7 次提交
  26. 13 2月, 2007 1 次提交
  27. 11 2月, 2007 1 次提交