17 Jun, 2011

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
    AFS: Use i_generation not i_version for the vnode uniquifier
    AFS: Set s_id in the superblock to the volume name
    vfs: Fix data corruption after failed write in __block_write_begin()
    afs: afs_fill_page reads too much, or wrong data
    VFS: Fix vfsmount overput on simultaneous automount
    fix wrong iput on d_inode introduced by e6bc45d65d
    Delay struct net freeing while there's a sysfs instance refering to it
    afs: fix sget() races, close leak on umount
    ubifs: fix sget races
    ubifs: split allocation of ubifs_info into a separate function
    fix leak in proc_set_super()

    Linus Torvalds
     

13 Jun, 2011

1 commit

  • * new refcount in struct net, controlling actual freeing of the memory
    * new method in kobj_ns_type_operations (->drop_ns())
    * ->current_ns() semantics change - it's supposed to be followed by
    corresponding ->drop_ns(). For struct net in case of CONFIG_NET_NS it bumps
    the new refcount; net_drop_ns() decrements it and calls net_free() if the
    last reference has been dropped. Method renamed to ->grab_current_ns().
    * old net_free() callers call net_drop_ns() instead.
    * sysfs_exit_ns() is gone, along with a large part of callchain
    leading to it; now that the references stored in ->ns[...] stay valid we
    do not need to hunt them down and replace them with NULL. That fixes
    problems in sysfs_lookup() and sysfs_readdir(), along with getting rid
    of sb->s_instances abuse.

    Note that struct net *shutdown* logics has not changed - net_cleanup()
    is called exactly when it used to be called. The only thing postponed by
    having a sysfs instance refering to that struct net is actual freeing of
    memory occupied by struct net.

    Signed-off-by: Al Viro

    Al Viro
     

12 Jun, 2011

2 commits

  • There is a dev_put(ndev) missing on an error path. This was
    introduced in 0c1ad04aecb "netpoll: prevent netpoll setup on slave
    devices".

    Signed-off-by: Dan Carpenter
    Signed-off-by: David S. Miller

    Dan Carpenter
     
  • Testing of VLAN_FLAG_REORDER_HDR does not belong in vlan_untag
    but rather in vlan_do_receive. Otherwise the vlan header
    will not be properly put on the packet in the case of
    vlan header accelleration.

    As we remove the check from vlan_check_reorder_header
    rename it vlan_reorder_header to keep the naming clean.

    Fix up the skb->pkt_type early so we don't look at the packet
    after adding the vlan tag, which guarantees we don't goof
    and look at the wrong field.

    Use a simple if statement instead of a complicated switch
    statement to decided that we need to increment rx_stats
    for a multicast packet.

    Hopefully at somepoint we will just declare the case where
    VLAN_FLAG_REORDER_HDR is cleared as unsupported and remove
    the code. Until then this keeps it working correctly.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Jiri Pirko
    Acked-by: Changli Gao
    Signed-off-by: David S. Miller

    Jiri Pirko
     

09 Jun, 2011

1 commit

  • In commit 8d8fc29d02a33e4bd5f4fa47823c1fd386346093
    (netpoll: disable netpoll when enslave a device), we automatically
    disable netpoll when the underlying device is being enslaved,
    we also need to prevent people from setuping netpoll on
    devices that are already enslaved.

    Signed-off-by: WANG Cong
    Signed-off-by: David S. Miller

    WANG Cong
     

07 Jun, 2011

2 commits

  • Frank Blaschka reported :

    During heavy network load we turn off/on cpus.
    Sometimes this causes a stall on the network device.
    Digging into the dump I found out following:

    napi is scheduled but does not run. From the I/O buffers
    and the napi state I see napi/rx_softirq processing has stopped
    because the budget was reached. napi stays in the
    softnet_data poll_list and the rx_softirq was raised again.

    I assume at this time the cpu offline comes in,
    the rx softirq is raised/moved to another cpu but napi stays in the
    poll_list of the softnet_data of the now offline cpu.

    Reviewing dev_cpu_callback (net/core/dev.c) I did not find the
    poll_list is transfered to the new cpu.

    This patch is a straightforward implementation of Frank suggestion :

    Transfert poll_list and trigger NET_RX_SOFTIRQ on new cpu.

    Reported-by: Frank Blaschka
    Signed-off-by: Heiko Carstens
    Signed-off-by: Eric Dumazet
    Tested-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Heiko Carstens
     
  • This interface uses a temporary buffer, but for no real reason.
    And now can generate warnings like:

    net/sched/sch_generic.c: In function dev_watchdog
    net/sched/sch_generic.c:254:10: warning: unused variable drivername

    Just return driver->name directly or "".

    Reported-by: Connor Hansen
    Signed-off-by: David S. Miller

    David S. Miller
     

06 Jun, 2011

1 commit

  • BTW, looking through the code related to struct net lifetime rules has
    caught something else:

    struct net *get_net_ns_by_fd(int fd)
    {
    ...
    file = proc_ns_fget(fd);
    if (!file)
    goto out;

    ei = PROC_I(file->f_dentry->d_inode);

    while in proc_ns_fget() we have two return ERR_PTR(...) and not a single
    path that would return NULL. The other caller of proc_ns_fget() treats
    ERR_PTR() correctly...

    Signed-off-by: Al Viro
    Signed-off-by: David S. Miller

    Al Viro
     

04 Jun, 2011

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (40 commits)
    tg3: Fix tg3_skb_error_unmap()
    net: tracepoint of net_dev_xmit sees freed skb and causes panic
    drivers/net/can/flexcan.c: add missing clk_put
    net: dm9000: Get the chip in a known good state before enabling interrupts
    drivers/net/davinci_emac.c: add missing clk_put
    af-packet: Add flag to distinguish VID 0 from no-vlan.
    caif: Fix race when conditionally taking rtnl lock
    usbnet/cdc_ncm: add missing .reset_resume hook
    vlan: fix typo in vlan_dev_hard_start_xmit()
    net/ipv4: Check for mistakenly passed in non-IPv4 address
    iwl4965: correctly validate temperature value
    bluetooth l2cap: fix locking in l2cap_global_chan_by_psm
    ath9k: fix two more bugs in tx power
    cfg80211: don't drop p2p probe responses
    Revert "net: fix section mismatches"
    drivers/net/usb/catc.c: Fix potential deadlock in catc_ctrl_run()
    sctp: stop pending timers and purge queues when peer restart asoc
    drivers/net: ks8842 Fix crash on received packet when in PIO mode.
    ip_options_compile: properly handle unaligned pointer
    iwlagn: fix incorrect PCI subsystem id for 6150 devices
    ...

    Linus Torvalds
     

03 Jun, 2011

1 commit

  • Because there is a possibility that skb is kfree_skb()ed and zero cleared
    after ndo_start_xmit, we should not see the contents of skb like skb->len and
    skb->dev->name after ndo_start_xmit. But trace_net_dev_xmit does that
    and causes panic by NULL pointer dereference.
    This patch fixes trace_net_dev_xmit not to see the contents of skb directly.

    If you want to reproduce this panic,

    1. Get tracepoint of net_dev_xmit on
    2. Create 2 guests on KVM
    2. Make 2 guests use virtio_net
    4. Execute netperf from one to another for a long time as a network burden
    5. host will panic(It takes about 30 minutes)

    Signed-off-by: Koki Sanagi
    Signed-off-by: David S. Miller

    Koki Sanagi
     

28 May, 2011

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    net: Kill ratelimit.h dependency in linux/net.h
    net: Add linux/sysctl.h includes where needed.
    net: Kill ether_table[] declaration.
    inetpeer: fix race in unused_list manipulations
    atm: expose ATM device index in sysfs
    IPVS: bug in ip_vs_ftp, same list heaad used in all netns.
    bug.h: Move ratelimit warn interfaces to ratelimit.h
    bonding: cleanup module option descriptions
    net:8021q:vlan.c Fix pr_info to just give the vlan fullname and version.
    net: davinci_emac: fix dev_err use at probe
    can: convert to %pK for kptr_restrict support
    net: fix ETHTOOL_SFEATURES compatibility with old ethtool_ops.set_flags
    netfilter: Fix several warnings in compat_mtw_from_user().
    netfilter: ipset: fix ip_set_flush return code
    netfilter: ipset: remove unused variable from type_pf_tdel()
    netfilter: ipset: Use proper timeout value to jiffies conversion

    Linus Torvalds
     
  • Ingo Molnar noticed that we have this unnecessary ratelimit.h
    dependency in linux/net.h, which hid compilation problems from
    people doing builds only with CONFIG_NET enabled.

    Move this stuff out to a seperate net/net_ratelimit.h file and
    include that in the only two places where this thing is needed.

    Signed-off-by: David S. Miller
    Acked-by: Ingo Molnar

    David S. Miller
     

27 May, 2011

2 commits


26 May, 2011

3 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/linux-2.6-nsfd:
    net: fix get_net_ns_by_fd for !CONFIG_NET_NS
    ns proc: Return -ENOENT for a nonexistent /proc/self/ns/ entry.
    ns: Declare sys_setns in syscalls.h
    net: Allow setting the network namespace by fd
    ns proc: Add support for the ipc namespace
    ns proc: Add support for the uts namespace
    ns proc: Add support for the network namespace.
    ns: Introduce the setns syscall
    ns: proc files for namespace naming policy.

    Linus Torvalds
     
  • Commit e67f88dd12f6 (dont hold rtnl mutex during netlink dump callbacks)
    missed fact that rtnl_fill_ifinfo() must be called with rtnl held.

    Because of possible deadlocks between two mutexes (cb_mutex and rtnl),
    its not easy to solve this problem, so revert this part of the patch.

    It also forgot one rcu_read_unlock() in FIB dump_rules()

    Add one ASSERT_RTNL() in rtnl_fill_ifinfo() to remind us the rule.

    Signed-off-by: Eric Dumazet
    CC: Patrick McHardy
    CC: Stephen Hemminger
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • If the device passed into dev_disable_lro is a vlan, then repoint the dev
    poniter so that we actually modify the underlying physical device.

    Signed-of-by: Neil Horman
    CC: davem@davemloft.net
    CC: bhutchings@solarflare.com

    Signed-off-by: David S. Miller

    Neil Horman
     

25 May, 2011

3 commits

  • After merging the final tree, today's linux-next build (powerpc
    ppc44x_defconfig) failed like this:

    net/built-in.o: In function `get_net_ns_by_fd':
    (.text+0x11976): undefined reference to `netns_operations'
    net/built-in.o: In function `get_net_ns_by_fd':
    (.text+0x1197a): undefined reference to `netns_operations'

    netns_operations is only available if CONFIG_NET_NS is set ...

    Caused by commit f063052947f7 ("net: Allow setting the network namespace
    by fd").

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Eric W. Biederman

    Stephen Rothwell
     
  • dst_default_metrics is readonly, we dont want to kfree() it later.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • synchronize_rcu() is very slow in various situations (HZ=100,
    CONFIG_NO_HZ=y, CONFIG_PREEMPT=n)

    Extract from my (mostly idle) 8 core machine :

    synchronize_rcu() in 99985 us
    synchronize_rcu() in 79982 us
    synchronize_rcu() in 87612 us
    synchronize_rcu() in 79827 us
    synchronize_rcu() in 109860 us
    synchronize_rcu() in 98039 us
    synchronize_rcu() in 89841 us
    synchronize_rcu() in 79842 us
    synchronize_rcu() in 80151 us
    synchronize_rcu() in 119833 us
    synchronize_rcu() in 99858 us
    synchronize_rcu() in 73999 us
    synchronize_rcu() in 79855 us
    synchronize_rcu() in 79853 us

    When we hold RTNL mutex, we would like to spend some cpu cycles but not
    block too long other processes waiting for this mutex.

    We also want to setup/dismantle network features as fast as possible at
    boot/shutdown time.

    This patch makes synchronize_net() call the expedited version if RTNL is
    locked.

    synchronize_rcu_expedited() typical delay is about 20 us on my machine.

    synchronize_rcu_expedited() in 18 us
    synchronize_rcu_expedited() in 18 us
    synchronize_rcu_expedited() in 18 us
    synchronize_rcu_expedited() in 18 us
    synchronize_rcu_expedited() in 20 us
    synchronize_rcu_expedited() in 16 us
    synchronize_rcu_expedited() in 20 us
    synchronize_rcu_expedited() in 18 us
    synchronize_rcu_expedited() in 18 us

    Signed-off-by: Eric Dumazet
    CC: Paul E. McKenney
    CC: Ben Greear
    Reviewed-by: Paul E. McKenney
    Signed-off-by: David S. Miller

    Eric Dumazet
     

24 May, 2011

1 commit

  • A mis-configured filter can spam the logs with lots of stack traces.

    Rate-limit the warnings and add printout of the bogus filter information.

    Original-patch-by: Ben Greear
    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     

23 May, 2011

4 commits


21 May, 2011

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1446 commits)
    macvlan: fix panic if lowerdev in a bond
    tg3: Add braces around 5906 workaround.
    tg3: Fix NETIF_F_LOOPBACK error
    macvlan: remove one synchronize_rcu() call
    networking: NET_CLS_ROUTE4 depends on INET
    irda: Fix error propagation in ircomm_lmp_connect_response()
    irda: Kill set but unused variable 'bytes' in irlan_check_command_param()
    irda: Kill set but unused variable 'clen' in ircomm_connect_indication()
    rxrpc: Fix set but unused variable 'usage' in rxrpc_get_transport()
    be2net: Kill set but unused variable 'req' in lancer_fw_download()
    irda: Kill set but unused vars 'saddr' and 'daddr' in irlan_provider_connect_indication()
    atl1c: atl1c_resume() is only used when CONFIG_PM_SLEEP is defined.
    rxrpc: Fix set but unused variable 'usage' in rxrpc_get_peer().
    rxrpc: Kill set but unused variable 'local' in rxrpc_UDP_error_handler()
    rxrpc: Kill set but unused variable 'sp' in rxrpc_process_connection()
    rxrpc: Kill set but unused variable 'sp' in rxrpc_rotate_tx_window()
    pkt_sched: Kill set but unused variable 'protocol' in tc_classify()
    isdn: capi: Use pr_debug() instead of ifdefs.
    tg3: Update version to 3.119
    tg3: Apply rx_discards fix to 5719/5720
    ...

    Fix up trivial conflicts in arch/x86/Kconfig and net/mac80211/agg-tx.c
    as per Davem.

    Linus Torvalds
     
  • Commit e66eed651fd1 ("list: remove prefetching from regular list
    iterators") removed the include of prefetch.h from list.h, which
    uncovered several cases that had apparently relied on that rather
    obscure header file dependency.

    So this fixes things up a bit, using

    grep -L linux/prefetch.h $(git grep -l '[^a-z_]prefetchw*(' -- '*.[ch]')
    grep -L 'prefetchw*(' $(git grep -l 'linux/prefetch.h' -- '*.[ch]')

    to guide us in finding files that either need
    inclusion, or have it despite not needing it.

    There are more of them around (mostly network drivers), but this gets
    many core ones.

    Reported-by: Stephen Rothwell
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

20 May, 2011

3 commits

  • When one macvlan device is dismantled, we can avoid one
    synchronize_rcu() call done after deletion from hash list, since caller
    will perform a synchronize_net() call after its ndo_stop() call.

    Add a new netdev->dismantle field to signal this dismantle intent.

    Reduces RTNL hold time.

    Signed-off-by: Eric Dumazet
    CC: Patrick McHardy
    CC: Ben Greear
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (78 commits)
    Revert "rcu: Decrease memory-barrier usage based on semi-formal proof"
    net,rcu: convert call_rcu(prl_entry_destroy_rcu) to kfree
    batman,rcu: convert call_rcu(softif_neigh_free_rcu) to kfree_rcu
    batman,rcu: convert call_rcu(neigh_node_free_rcu) to kfree()
    batman,rcu: convert call_rcu(gw_node_free_rcu) to kfree_rcu
    net,rcu: convert call_rcu(kfree_tid_tx) to kfree_rcu()
    net,rcu: convert call_rcu(xt_osf_finger_free_rcu) to kfree_rcu()
    net/mac80211,rcu: convert call_rcu(work_free_rcu) to kfree_rcu()
    net,rcu: convert call_rcu(wq_free_rcu) to kfree_rcu()
    net,rcu: convert call_rcu(phonet_device_rcu_free) to kfree_rcu()
    perf,rcu: convert call_rcu(swevent_hlist_release_rcu) to kfree_rcu()
    perf,rcu: convert call_rcu(free_ctx) to kfree_rcu()
    net,rcu: convert call_rcu(__nf_ct_ext_free_rcu) to kfree_rcu()
    net,rcu: convert call_rcu(net_generic_release) to kfree_rcu()
    net,rcu: convert call_rcu(netlbl_unlhsh_free_addr6) to kfree_rcu()
    net,rcu: convert call_rcu(netlbl_unlhsh_free_addr4) to kfree_rcu()
    security,rcu: convert call_rcu(sel_netif_free) to kfree_rcu()
    net,rcu: convert call_rcu(xps_dev_maps_release) to kfree_rcu()
    net,rcu: convert call_rcu(xps_map_release) to kfree_rcu()
    net,rcu: convert call_rcu(rps_map_release) to kfree_rcu()
    ...

    Linus Torvalds
     
  • David S. Miller
     

19 May, 2011

1 commit

  • It's way past it's usefulness. And this gets rid of a bunch
    of stray ->rt_{dst,src} references.

    Even the comment documenting the macro was inaccurate (stated
    default was 1 when it's 0).

    If reintroduced, it should be done properly, with dynamic debug
    facilities.

    Signed-off-by: David S. Miller

    David S. Miller
     

18 May, 2011

5 commits

  • Commit 7fee226ad239 (add a noref bit on skb dst) forgot to use
    skb_dst_force() on packets queued in sk_error_queue

    This triggers following warning, for applications using IP_CMSG_PKTINFO
    receiving one error status

    ------------[ cut here ]------------
    WARNING: at include/linux/skbuff.h:457 ip_cmsg_recv_pktinfo+0xa6/0xb0()
    Hardware name: 2669UYD
    Modules linked in: isofs vboxnetadp vboxnetflt nfsd ebtable_nat ebtables
    lib80211_crypt_ccmp uinput xcbc hdaps tp_smapi thinkpad_ec radeonfb fb_ddc
    radeon ttm drm_kms_helper drm ipw2200 intel_agp intel_gtt libipw i2c_algo_bit
    i2c_i801 agpgart rng_core cfbfillrect cfbcopyarea cfbimgblt video raid10 raid1
    raid0 linear md_mod vboxdrv
    Pid: 4697, comm: miredo Not tainted 2.6.39-rc6-00569-g5895198-dirty #22
    Call Trace:
    [] ? printk+0x1d/0x1f
    [] warn_slowpath_common+0x72/0xa0
    [] ? ip_cmsg_recv_pktinfo+0xa6/0xb0
    [] ? ip_cmsg_recv_pktinfo+0xa6/0xb0
    [] warn_slowpath_null+0x20/0x30
    [] ip_cmsg_recv_pktinfo+0xa6/0xb0
    [] ip_cmsg_recv+0x127/0x260
    [] ? skb_dequeue+0x4d/0x70
    [] ? skb_copy_datagram_iovec+0x53/0x300
    [] ? sub_preempt_count+0x24/0x50
    [] ip_recv_error+0x23d/0x270
    [] udp_recvmsg+0x264/0x2b0
    [] inet_recvmsg+0xd9/0x130
    [] sock_recvmsg+0xf2/0x120
    [] ? might_fault+0x4b/0xa0
    [] ? verify_iovec+0x4c/0xc0
    [] ? sock_recvmsg_nosec+0x100/0x100
    [] __sys_recvmsg+0x114/0x1e0
    [] ? __lock_acquire+0x365/0x780
    [] ? fget_light+0xa6/0x3e0
    [] ? fget_light+0xbf/0x3e0
    [] ? fget_light+0x2e/0x3e0
    [] sys_recvmsg+0x39/0x60

    Close bug https://bugzilla.kernel.org/show_bug.cgi?id=34622

    Reported-by: Witold Baryluk
    Signed-off-by: Eric Dumazet
    CC: Stephen Hemminger
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Conflicts:
    drivers/net/vmxnet3/vmxnet3_ethtool.c
    net/core/dev.c

    David S. Miller
     
  • Signed-off-by: Michał Mirosław
    Signed-off-by: David S. Miller

    Michał Mirosław
     
  • Cool, how about we make 'Features changed' debug as well?
    This way userspace can't fill up the log just by tweaking tun features
    with an ioctl.

    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    Michael S. Tsirkin
     
  • Using plain hlist_del() in dev_change_name() is wrong since a
    concurrent reader can crash trying to dereference LIST_POISON1.

    Bug introduced in commit 72c9528bab94 (net: Introduce
    dev_get_by_name_rcu())

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

17 May, 2011

2 commits

  • Those reduced to DEBUG can possibly be triggered by unprivileged processes
    and are nothing exceptional. Illegal checksum combinations can only be
    caused by driver bug, so promote those messages to WARN.

    Since GSO without SG will now only cause DEBUG message from
    netdev_fix_features(), remove the workaround from register_netdevice().

    Signed-off-by: Michał Mirosław
    Signed-off-by: David S. Miller

    Michał Mirosław
     
  • We plan to remove cpu_xx() old api later. Thus this patch
    convert it.

    This patch has no functional change.

    Signed-off-by: KOSAKI Motohiro
    Signed-off-by: David S. Miller

    KOSAKI Motohiro
     

14 May, 2011

2 commits

  • In commit 1c5cae815d19 (net: call dev_alloc_name from register_netdevice),
    a bug of bonding was involved, see example 1 and 2.

    In register_netdevice(), the name of net_device is not valid until
    dev_get_valid_name() is called. But dev->netdev_ops->ndo_init(that is
    bond_init) is called before dev_get_valid_name(),
    and it uses the invalid name of net_device.

    I think register_netdevice() should make sure that the name of net_device is
    valid before calling ndo_init().

    example 1:
    modprobe bonding
    ls /proc/net/bonding/bond%d

    ps -eLf
    root 3398 2 3398 0 1 21:34 ? 00:00:00 [bond%d]

    example 2:
    modprobe bonding max_bonds=3

    [ 170.100292] bonding: Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
    [ 170.101090] bonding: Warning: either miimon or arp_interval and arp_ip_target module parameters must be specified, otherwise bonding will not detect link failures! see bonding.txt for details.
    [ 170.102469] ------------[ cut here ]------------
    [ 170.103150] WARNING: at /home/pwp/net-next-2.6/fs/proc/generic.c:586 proc_register+0x126/0x157()
    [ 170.104075] Hardware name: VirtualBox
    [ 170.105065] proc_dir_entry 'bonding/bond%d' already registered
    [ 170.105613] Modules linked in: bonding(+) sunrpc ipv6 uinput microcode ppdev parport_pc parport joydev e1000 pcspkr i2c_piix4 i2c_core [last unloaded: bonding]
    [ 170.108397] Pid: 3457, comm: modprobe Not tainted 2.6.39-rc2+ #14
    [ 170.108935] Call Trace:
    [ 170.109382] [] warn_slowpath_common+0x6a/0x7f
    [ 170.109911] [] ? proc_register+0x126/0x157
    [ 170.110329] [] warn_slowpath_fmt+0x2b/0x2f
    [ 170.110846] [] proc_register+0x126/0x157
    [ 170.111870] [] proc_create_data+0x82/0x98
    [ 170.112335] [] bond_create_proc_entry+0x3f/0x73 [bonding]
    [ 170.112905] [] bond_init+0x77/0xa5 [bonding]
    [ 170.113319] [] register_netdevice+0x8c/0x1d3
    [ 170.113848] [] bond_create+0x6c/0x90 [bonding]
    [ 170.114322] [] bonding_init+0x763/0x7b1 [bonding]
    [ 170.114879] [] do_one_initcall+0x76/0x122
    [ 170.115317] [] ? 0xf94f3fff
    [ 170.115799] [] sys_init_module+0x1286/0x140d
    [ 170.116879] [] sysenter_do_call+0x12/0x28
    [ 170.117404] ---[ end trace 64e4fac3ae5fff1a ]---
    [ 170.117924] bond%d: Warning: failed to register to debugfs
    [ 170.128728] ------------[ cut here ]------------
    [ 170.129360] WARNING: at /home/pwp/net-next-2.6/fs/proc/generic.c:586 proc_register+0x126/0x157()
    [ 170.130323] Hardware name: VirtualBox
    [ 170.130797] proc_dir_entry 'bonding/bond%d' already registered
    [ 170.131315] Modules linked in: bonding(+) sunrpc ipv6 uinput microcode ppdev parport_pc parport joydev e1000 pcspkr i2c_piix4 i2c_core [last unloaded: bonding]
    [ 170.133731] Pid: 3457, comm: modprobe Tainted: G W 2.6.39-rc2+ #14
    [ 170.134308] Call Trace:
    [ 170.134743] [] warn_slowpath_common+0x6a/0x7f
    [ 170.135305] [] ? proc_register+0x126/0x157
    [ 170.135820] [] warn_slowpath_fmt+0x2b/0x2f
    [ 170.137168] [] proc_register+0x126/0x157
    [ 170.137700] [] proc_create_data+0x82/0x98
    [ 170.138174] [] bond_create_proc_entry+0x3f/0x73 [bonding]
    [ 170.138745] [] bond_init+0x77/0xa5 [bonding]
    [ 170.139278] [] register_netdevice+0x8c/0x1d3
    [ 170.139828] [] bond_create+0x6c/0x90 [bonding]
    [ 170.140361] [] bonding_init+0x763/0x7b1 [bonding]
    [ 170.140927] [] do_one_initcall+0x76/0x122
    [ 170.141494] [] ? 0xf94f3fff
    [ 170.141975] [] sys_init_module+0x1286/0x140d
    [ 170.142463] [] sysenter_do_call+0x12/0x28
    [ 170.142974] ---[ end trace 64e4fac3ae5fff1b ]---
    [ 170.144949] bond%d: Warning: failed to register to debugfs

    Signed-off-by: Weiping Pan
    Reviewed-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Peter Pan(潘卫平)
     
  • Added code to take FW dump via ethtool. Dump level can be controlled via setting the
    dump flag. A get function is provided to query the current setting of the dump flag.
    Dump data is obtained from the driver via a separate get function.

    Changes from v3:
    Fixed buffer length issue in ethtool_get_dump_data function.
    Updated kernel doc for ethtool_dump struct and get_dump_flag function.

    Changes from v2:
    Provided separate commands for get flag and data.
    Check for minimum of the two buffer length obtained via ethtool and driver and
    use that for dump buffer
    Pass up the driver return error codes up to the caller.
    Added kernel doc comments.

    Signed-off-by: Anirban Chakraborty
    Reviewed-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Anirban Chakraborty