1. 25 2月, 2009 1 次提交
    • P
      netlink: change nlmsg_notify() return value logic · 1ce85fe4
      Pablo Neira Ayuso 提交于
      This patch changes the return value of nlmsg_notify() as follows:
      
      If NETLINK_BROADCAST_ERROR is set by any of the listeners and
      an error in the delivery happened, return the broadcast error;
      else if there are no listeners apart from the socket that
      requested a change with the echo flag, return the result of the
      unicast notification. Thus, with this patch, the unicast
      notification is handled in the same way of a broadcast listener
      that has set the NETLINK_BROADCAST_ERROR socket flag.
      
      This patch is useful in case that the caller of nlmsg_notify()
      wants to know the result of the delivery of a netlink notification
      (including the broadcast delivery) and take any action in case
      that the delivery failed. For example, ctnetlink can drop packets
      if the event delivery failed to provide reliable logging and
      state-synchronization at the cost of dropping packets.
      
      This patch also modifies the rtnetlink code to ignore the return
      value of rtnl_notify() in all callers. The function rtnl_notify()
      (before this patch) returned the error of the unicast notification
      which makes rtnl_set_sk_err() reports errors to all listeners. This
      is not of any help since the origin of the change (the socket that
      requested the echoing) notices the ENOBUFS error if the notification
      fails and should resync itself.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Acked-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1ce85fe4
  2. 11 12月, 2008 1 次提交
  3. 27 11月, 2008 1 次提交
  4. 17 10月, 2008 2 次提交
  5. 16 10月, 2008 1 次提交
  6. 26 3月, 2008 1 次提交
  7. 29 1月, 2008 3 次提交
  8. 30 11月, 2007 1 次提交
  9. 07 11月, 2007 1 次提交
    • A
      [DECNET]: "addr" module param can't be __initdata · 4e058063
      Alexey Dobriyan 提交于
      sysfs keeps references to module parameters via /sys/module/*/parameters,
      so marking them as __initdata can't work.
      
      Steps to reproduce:
      
      	modprobe decnet
      	cat /sys/module/decnet/parameters/addr
      
      BUG: unable to handle kernel paging request at virtual address f88cd410
      printing eip: c043dfd1 *pdpt = 0000000000004001 *pde = 0000000004408067 *pte = 0000000000000000
      Oops: 0000 [#1] PREEMPT SMP
      Modules linked in: decnet sunrpc af_packet ipv6 binfmt_misc dm_mirror dm_multipath dm_mod sbs sbshc fan dock battery backlight ac power_supply parport loop rtc_cmos serio_raw rtc_core rtc_lib button amd_rng sr_mod cdrom shpchp pci_hotplug ehci_hcd ohci_hcd uhci_hcd usbcore
      Pid: 2099, comm: cat Not tainted (2.6.24-rc1-b1d08ac0-bloat #6)
      EIP: 0060:[<c043dfd1>] EFLAGS: 00210286 CPU: 1
      EIP is at param_get_int+0x6/0x20
      EAX: c5c87000 EBX: 00000000 ECX: 000080d0 EDX: f88cd410
      ESI: f8a108f8 EDI: c5c87000 EBP: 00000000 ESP: c5c97f00
       DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
      Process cat (pid: 2099, ti=c5c97000 task=c641ee10 task.ti=c5c97000)
      Stack: 00000000 f8a108f8 c5c87000 c043db6b f8a108f1 00000124 c043de1a c043db2f
             f88cd410 ffffffff c5c87000 f8a16bc8 f8a16bc8 c043dd69 c043dd54 c5dd5078
             c043dbc8 c5cc7580 c06ee64c c5d679f8 c04c431f c641f480 c641f484 00001000
      Call Trace:
       [<c043db6b>] param_array_get+0x3c/0x62
       [<c043de1a>] param_array_set+0x0/0xdf
       [<c043db2f>] param_array_get+0x0/0x62
       [<c043dd69>] param_attr_show+0x15/0x2d
       [<c043dd54>] param_attr_show+0x0/0x2d
       [<c043dbc8>] module_attr_show+0x1a/0x1e
       [<c04c431f>] sysfs_read_file+0x7c/0xd9
       [<c04c42a3>] sysfs_read_file+0x0/0xd9
       [<c048d4b2>] vfs_read+0x88/0x134
       [<c042090b>] do_page_fault+0x0/0x7d5
       [<c048d920>] sys_read+0x41/0x67
       [<c04080fa>] sysenter_past_esp+0x6b/0xc1
       =======================
      Code: 00 83 c4 0c c3 83 ec 0c 8b 52 10 8b 12 c7 44 24 04 27 dd 6c c0 89 04 24 89 54 24 08 e8 ea 01 0c 00 83 c4 0c c3 83 ec 0c 8b 52 10 <8b> 12 c7 44 24 04 58 8c 6a c0 89 04 24 89 54 24 08 e8 ca 01 0c
      EIP: [<c043dfd1>] param_get_int+0x6/0x20 SS:ESP 0068:c5c97f00
      Signed-off-by: NAlexey Dobriyan <adobriyan@sw.ru>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4e058063
  10. 11 10月, 2007 5 次提交
    • E
      [NET]: Make the loopback device per network namespace. · 2774c7ab
      Eric W. Biederman 提交于
      This patch makes loopback_dev per network namespace.  Adding
      code to create a different loopback device for each network
      namespace and adding the code to free a loopback device
      when a network namespace exits.
      
      This patch modifies all users the loopback_dev so they
      access it as init_net.loopback_dev, keeping all of the
      code compiling and working.  A later pass will be needed to
      update the users to use something other than the initial network
      namespace.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2774c7ab
    • D
      [NET]: Dynamically allocate the loopback device, part 1. · de3cb747
      Daniel Lezcano 提交于
      This patch replaces all occurences to the static variable
      loopback_dev to a pointer loopback_dev. That provides the
      mindless, trivial, uninteressting change part for the dynamic
      allocation for the loopback.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDaniel Lezcano <dlezcano@fr.ibm.com>
      Acked-By: NKirill Korotaev <dev@sw.ru>
      Acked-by: NBenjamin Thery <benjamin.thery@bull.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      de3cb747
    • D
      [NET]: all net/ cleanup with ARRAY_SIZE · 8b14a536
      Denis Cheng 提交于
      Signed-off-by: NDenis Cheng <crquan@gmail.com>
      8b14a536
    • 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 /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
  11. 11 9月, 2007 1 次提交
  12. 11 7月, 2007 2 次提交
  13. 08 6月, 2007 1 次提交
  14. 04 5月, 2007 1 次提交
  15. 26 4月, 2007 3 次提交
  16. 15 2月, 2007 2 次提交
  17. 13 2月, 2007 1 次提交
  18. 11 2月, 2007 1 次提交
  19. 09 2月, 2007 1 次提交
    • P
      [NETLINK]: Don't BUG on undersized allocations · 26932566
      Patrick McHardy 提交于
      Currently netlink users BUG when the allocated skb for an event
      notification is undersized. While this is certainly a kernel bug,
      its not critical and crashing the kernel is too drastic, especially
      when considering that these errors have appeared multiple times in
      the past and it BUGs even if no listeners are present.
      
      This patch replaces BUG by WARN_ON and changes the notification
      functions to inform potential listeners of undersized allocations
      using a unique error code (EMSGSIZE).
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      26932566
  20. 26 1月, 2007 1 次提交
  21. 11 12月, 2006 1 次提交
  22. 03 12月, 2006 4 次提交
  23. 23 9月, 2006 3 次提交
  24. 22 7月, 2006 1 次提交