08 Dec, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1815 commits)
    mac80211: fix reorder buffer release
    iwmc3200wifi: Enable wimax core through module parameter
    iwmc3200wifi: Add wifi-wimax coexistence mode as a module parameter
    iwmc3200wifi: Coex table command does not expect a response
    iwmc3200wifi: Update wiwi priority table
    iwlwifi: driver version track kernel version
    iwlwifi: indicate uCode type when fail dump error/event log
    iwl3945: remove duplicated event logging code
    b43: fix two warnings
    ipw2100: fix rebooting hang with driver loaded
    cfg80211: indent regulatory messages with spaces
    iwmc3200wifi: fix NULL pointer dereference in pmkid update
    mac80211: Fix TX status reporting for injected data frames
    ath9k: enable 2GHz band only if the device supports it
    airo: Fix integer overflow warning
    rt2x00: Fix padding bug on L2PAD devices.
    WE: Fix set events not propagated
    b43legacy: avoid PPC fault during resume
    b43: avoid PPC fault during resume
    tcp: fix a timewait refcnt race
    ...

    Fix up conflicts due to sysctl cleanups (dead sysctl_check code and
    CTL_UNNUMBERED removed) in
    kernel/sysctl_check.c
    net/ipv4/sysctl_net_ipv4.c
    net/ipv6/addrconf.c
    net/sctp/sysctl.c

    Linus Torvalds
     

26 Nov, 2009

1 commit

  • Generated with the following semantic patch

    @@
    struct net *n1;
    struct net *n2;
    @@
    - n1 == n2
    + net_eq(n1, n2)

    @@
    struct net *n1;
    struct net *n2;
    @@
    - n1 != n2
    + !net_eq(n1, n2)

    applied over {include,net,drivers/net}.

    Signed-off-by: Octavian Purdila
    Signed-off-by: David S. Miller

    Octavian Purdila
     

12 Nov, 2009

3 commits

  • Now that sys_sysctl is a compatiblity wrapper around /proc/sys
    all sysctl strategy routines, and all ctl_name and strategy
    entries in the sysctl tables are unused, and can be
    revmoed.

    In addition neigh_sysctl_register has been modified to no longer
    take a strategy argument and it's callers have been modified not
    to pass one.

    Cc: "David Miller"
    Cc: Hideaki YOSHIFUJI
    Cc: netdev@vger.kernel.org
    Signed-off-by: Eric W. Biederman

    Eric W. Biederman
     
  • There is no reason for this lock to be reader/writer since
    the reader only has lock held for a very brief period.
    The overhead of read_lock is more expensive than spinlock.

    Compile tested only, I am not a decnet user.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    stephen hemminger
     
  • Add missing locking in the case of auto binding to the
    default device. The address list might change while this code is looking
    at the list.

    Compile tested only, I am not a decnet user.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    stephen hemminger
     

11 Nov, 2009

1 commit


05 Nov, 2009

1 commit


24 Sep, 2009

1 commit

  • It's unused.

    It isn't needed -- read or write flag is already passed and sysctl
    shouldn't care about the rest.

    It _was_ used in two places at arch/frv for some reason.

    Signed-off-by: Alexey Dobriyan
    Cc: David Howells
    Cc: "Eric W. Biederman"
    Cc: Al Viro
    Cc: Ralf Baechle
    Cc: Martin Schwidefsky
    Cc: Ingo Molnar
    Cc: "David S. Miller"
    Cc: James Morris
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

27 Feb, 2009

2 commits

  • Impact: Remove redundant variable declarations, resp. rename
    inner scope variable.

    Fix this sparse warnings:
    net/decnet/af_decnet.c:1252:40: warning: symbol 'skb' shadows an earlier one
    net/decnet/af_decnet.c:1223:24: originally declared here
    net/decnet/af_decnet.c:1582:29: warning: symbol 'val' shadows an earlier one
    net/decnet/af_decnet.c:1527:22: originally declared here
    net/decnet/dn_dev.c:687:21: warning: symbol 'err' shadows an earlier one
    net/decnet/dn_dev.c:670:13: originally declared here
    net/decnet/sysctl_net_decnet.c:182:21: warning: symbol 'len' shadows an earlier one
    net/decnet/sysctl_net_decnet.c:173:16: originally declared here

    Signed-off-by: Hannes Eder
    Signed-off-by: David S. Miller

    Hannes Eder
     
  • Impact: Attribute functions with __acquires(...) resp. __releases(...).

    Fix this sparse warnings:
    net/decnet/dn_dev.c:1324:13: warning: context imbalance in 'dn_dev_seq_start' - wrong count at exit
    net/decnet/dn_dev.c:1366:13: warning: context imbalance in 'dn_dev_seq_stop' - unexpected unlock

    Signed-off-by: Hannes Eder
    Signed-off-by: David S. Miller

    Hannes Eder
     

25 Feb, 2009

1 commit

  • 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: Pablo Neira Ayuso
    Acked-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Pablo Neira Ayuso
     

11 Dec, 2008

1 commit


27 Nov, 2008

1 commit


17 Oct, 2008

4 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    net: Remove CONFIG_KMOD from net/ (towards removing CONFIG_KMOD entirely)
    ipv4: Add a missing rcu_assign_pointer() in routing cache.
    [netdrvr] ibmtr: PCMCIA IBMTR is ok on 64bit
    xen-netfront: Avoid unaligned accesses to IP header
    lmc: copy_*_user under spinlock
    [netdrvr] myri10ge, ixgbe: remove broken select INTEL_IOATDMA

    Linus Torvalds
     
  • Some code here depends on CONFIG_KMOD to not try to load
    protocol modules or similar, replace by CONFIG_MODULES
    where more than just request_module depends on CONFIG_KMOD
    and and also use try_then_request_module in ebtables.

    Signed-off-by: Johannes Berg
    Signed-off-by: Rusty Russell
    Signed-off-by: David S. Miller

    Johannes Berg
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (26 commits)
    decnet: Fix compiler warning in dn_dev.c
    IPV6: Fix default gateway criteria wrt. HIGH/LOW preference radv option
    net/802/fc.c: Fix compilation warnings
    netns: correct mib stats in ip6_route_me_harder()
    netns: fix net_generic array leak
    rt2x00: fix regression introduced by "mac80211: free up 2 bytes in skb->cb"
    rtl8187: Add USB ID for Belkin F5D7050 with RTL8187B chip
    p54usb: Device ID updates
    mac80211: fixme for kernel-doc
    ath9k/mac80211: disallow fragmentation in ath9k, report to userspace
    libertas : Remove unused variable warning for "old_channel" from cmd.c
    mac80211: Fix scan RX processing oops
    orinoco: fix unsafe locking in spectrum_cs_suspend
    orinoco: fix unsafe locking in orinoco_cs_resume
    cfg80211: fix debugfs error handling
    mac80211: fix debugfs netdev rename
    iwlwifi: fix ct kill configuration for 5350
    mac80211: fix HT information element parsing
    p54: Fix compilation problem on PPC
    mac80211: fix debugfs lockup
    ...

    Linus Torvalds
     
  • name and nlen parameters passed to ->strategy hook are unused, remove
    them. In general ->strategy hook should know what it's doing, and don't
    do something tricky for which, say, pointer to original userspace array
    may be needed (name).

    Signed-off-by: Alexey Dobriyan
    Acked-by: David S. Miller [ networking bits ]
    Cc: Ralf Baechle
    Cc: David Howells
    Cc: Matt Mackall
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

16 Oct, 2008

1 commit


26 Mar, 2008

1 commit


29 Jan, 2008

3 commits

  • The decnet includes two places to patch. The first one is
    the net/decnet table itself, and it is patched just like
    other subsystems in the first patch in this series.

    The second place is a bit more complex - it is the
    net/decnet/conf/xxx entries,. similar to those in
    ipv4/devinet.c and ipv6/addrconf.c. This code is made similar
    to those in ipv[46].

    Signed-off-by: Pavel Emelyanov
    Signed-off-by: David S. Miller

    Pavel Emelyanov
     
  • After this patch none of the netlink callback support anything
    except the initial network namespace but the rtnetlink infrastructure
    now handles multiple network namespaces.

    Changes from v2:
    - IPv6 addrlabel processing

    Changes from v1:
    - no need for special rtnl_unlock handling
    - fixed IPv6 ndisc

    Signed-off-by: Denis V. Lunev
    Signed-off-by: Eric W. Biederman
    Signed-off-by: David S. Miller

    Denis V. Lunev
     
  • Before I can enable rtnetlink to work in all network namespaces I need
    to be certain that something won't break. So this patch deliberately
    disables all of the rtnletlink methods in everything except the
    initial network namespace. After the methods have been audited this
    extra check can be disabled.

    Changes from v1:
    - added IPv6 addrlabel protection

    Signed-off-by: Denis V. Lunev
    Signed-off-by: Eric W. Biederman
    Signed-off-by: David S. Miller
    Signed-off-by: Herbert Xu

    Denis V. Lunev
     

30 Nov, 2007

1 commit

  • As far as I see from the err variable initialization
    the dn_nl_deladdr() routine was designed to report errors
    like "EADDRNOTAVAIL" and probaby "ENODEV".

    But the code sets this err to 0 after the first nlmsg_parse
    and goes on, returning this 0 in any case.

    Signed-off-by: Pavel Emelyanov
    Acked-by: Steven Whitehouse
    Signed-off-by: Herbert Xu

    Pavel Emelyanov
     

07 Nov, 2007

1 commit

  • 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-b1d08ac064268d0ae2281e98bf5e82627e0f0c56-bloat #6)
    EIP: 0060:[] 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:
    [] param_array_get+0x3c/0x62
    [] param_array_set+0x0/0xdf
    [] param_array_get+0x0/0x62
    [] param_attr_show+0x15/0x2d
    [] param_attr_show+0x0/0x2d
    [] module_attr_show+0x1a/0x1e
    [] sysfs_read_file+0x7c/0xd9
    [] sysfs_read_file+0x0/0xd9
    [] vfs_read+0x88/0x134
    [] do_page_fault+0x0/0x7d5
    [] sys_read+0x41/0x67
    [] 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 12 c7 44 24 04 58 8c 6a c0 89 04 24 89 54 24 08 e8 ca 01 0c
    EIP: [] param_get_int+0x6/0x20 SS:ESP 0068:c5c97f00

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: David S. Miller

    Alexey Dobriyan
     

11 Oct, 2007

5 commits

  • 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: Eric W. Biederman
    Signed-off-by: David S. Miller

    Eric W. Biederman
     
  • 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: Eric W. Biederman
    Signed-off-by: Daniel Lezcano
    Acked-By: Kirill Korotaev
    Acked-by: Benjamin Thery
    Signed-off-by: David S. Miller

    Daniel Lezcano
     
  • Signed-off-by: Denis Cheng

    Denis Cheng
     
  • 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: Eric W. Biederman
    Signed-off-by: David S. Miller

    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: Eric W. Biederman
    Signed-off-by: David S. Miller

    Eric W. Biederman
     

11 Sep, 2007

1 commit


11 Jul, 2007

2 commits


08 Jun, 2007

1 commit


04 May, 2007

1 commit

  • Cleanup of dev_base list use, with the aim to simplify making device
    list per-namespace. In almost every occasion, use of dev_base variable
    and dev->next pointer could be easily replaced by for_each_netdev
    loop. A few most complicated places were converted to using
    first_netdev()/next_netdev().

    Signed-off-by: Pavel Emelianov
    Acked-by: Kirill Korotaev
    Signed-off-by: David S. Miller

    Pavel Emelianov
     

26 Apr, 2007

3 commits


15 Feb, 2007

2 commits

  • It isn't needed anymore, all of the users are gone, and all of the ctl_table
    initializers have been converted to use explicit names of the fields they are
    initializing.

    [akpm@osdl.org: NTFS fix]
    Signed-off-by: Eric W. Biederman
    Acked-by: Stephen Smalley
    Cc: James Morris
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • The semantic effect of insert_at_head is that it would allow new registered
    sysctl entries to override existing sysctl entries of the same name. Which is
    pain for caching and the proc interface never implemented.

    I have done an audit and discovered that none of the current users of
    register_sysctl care as (excpet for directories) they do not register
    duplicate sysctl entries.

    So this patch simply removes the support for overriding existing entries in
    the sys_sysctl interface since no one uses it or cares and it makes future
    enhancments harder.

    Signed-off-by: Eric W. Biederman
    Acked-by: Ralf Baechle
    Acked-by: Martin Schwidefsky
    Cc: Russell King
    Cc: David Howells
    Cc: "Luck, Tony"
    Cc: Ralf Baechle
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Andi Kleen
    Cc: Jens Axboe
    Cc: Corey Minyard
    Cc: Neil Brown
    Cc: "John W. Linville"
    Cc: James Bottomley
    Cc: Jan Kara
    Cc: Trond Myklebust
    Cc: Mark Fasheh
    Cc: David Chinner
    Cc: "David S. Miller"
    Cc: Patrick McHardy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     

13 Feb, 2007

1 commit

  • Many struct file_operations in the kernel can be "const". Marking them const
    moves these to the .rodata section, which avoids false sharing with potential
    dirty data. In addition it'll catch accidental writes at compile time to
    these shared resources.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven