* Re: build breakage due to br_multicast.c referencing ipv6_dev_get_saddr()
From: Jan Beulich @ 2011-03-17 7:53 UTC (permalink / raw)
To: David Miller, shemminger; +Cc: bridge, netdev, linus.luessing
In-Reply-To: <20110316.104937.189702706.davem@davemloft.net>
>>> On 16.03.11 at 18:49, David Miller <davem@davemloft.net> wrote:
> From: Stephen Hemminger <shemminger@linux-foundation.org>
> Date: Wed, 16 Mar 2011 08:24:41 -0700
>
>> On Wed, 16 Mar 2011 12:34:19 +0000
>> "Jan Beulich" <JBeulich@novell.com> wrote:
>>
>>> With BRIDGE=y and IPV6=m commit
>>> fe29ec41aaa51902aebd63658dfb04fe6fea8be5 ("bridge: Use IPv6
>>> link-local address for multicast listener queries") causes the build to
>>> break.
>>
>> Rather than continue with the config games, lets just make the necessary
>> ipv6 pieces accessible.
>
> You can't Stephen, ipv6_dev_get_saddr() requires access to the actual ipv6
> device state, that means you have to pull in the entire ipv6 stack in
> because
> there are dependencies all the way down into the routing code.
>
> We added a Kconfig fix to cure this specific problem, which made it
> into 2.6.38-final, so I don't understand why Jan is even seeing this,
> it's supposed to force BRIDGE modular if IPV6 is modular:
Oh, sorry, I was still on -rc7.
Nevertheless, I don't think this is the right way to fix it (nor
in infiniband and possibly ip_vs as pointed out).
Jan
> commit dcbcdf22f500ac6e4ec06485341024739b9dc241
> Author: Randy Dunlap <randy.dunlap@oracle.com>
> Date: Thu Mar 10 13:45:57 2011 -0800
>
> net: bridge builtin vs. ipv6 modular
>
> When configs BRIDGE=y and IPV6=m, this build error occurs:
>
> br_multicast.c:(.text+0xa3341): undefined reference to
> `ipv6_dev_get_saddr'
>
> BRIDGE_IGMP_SNOOPING is boolean; if it were tristate, then adding
> depends on IPV6 || IPV6=n
> to BRIDGE_IGMP_SNOOPING would be a good fix. As it is currently,
> making BRIDGE depend on the IPV6 config works.
>
> Reported-by: Patrick Schaaf <netdev@bof.de>
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
>
> diff --git a/net/bridge/Kconfig b/net/bridge/Kconfig
> index 9190ae4..6dee7bf 100644
> --- a/net/bridge/Kconfig
> +++ b/net/bridge/Kconfig
> @@ -6,6 +6,7 @@ config BRIDGE
> tristate "802.1d Ethernet Bridging"
> select LLC
> select STP
> + depends on IPV6 || IPV6=n
> ---help---
> If you say Y here, then your Linux box will be able to act as an
> Ethernet bridge, which means that the different Ethernet segments it
^ permalink raw reply
* Re: build breakage due to br_multicast.c referencing ipv6_dev_get_saddr()
From: Jan Beulich @ 2011-03-17 7:57 UTC (permalink / raw)
To: Brian Haley; +Cc: davem, shemminger, bridge, netdev, linus.luessing
In-Reply-To: <4D80F494.6050906@hp.com>
>>> On 16.03.11 at 18:34, Brian Haley <brian.haley@hp.com> wrote:
> On 03/16/2011 08:34 AM, Jan Beulich wrote:
>> With BRIDGE=y and IPV6=m commit
>> fe29ec41aaa51902aebd63658dfb04fe6fea8be5 ("bridge: Use IPv6
>> link-local address for multicast listener queries") causes the build to
>> break.
>>
>> Similary, even if both are =m, but ipv6.ko got blacklisted (as is
>> happening in various SuSE distros when disabling IPv6), there's
>> a runtime problem since bridge.ko then won't load anymore due
>> to the missing symbol.
>
> Load the ipv6 module with disable=1, which is why I added it :)
Indeed, I realized there is such an option only after I sent
that mail. Nevertheless, I think it is overkill to load a huge
module like this just to satisfy never actually used symbol
references.
In fact, just like it seems bogus to load ipv6.ko in a pure IPv4
environment, I think the opposite is also true: IPv4 support
should be in a module, and it should be possible to not load
it in a pure IPv6 environment.
Jan
^ permalink raw reply
* Re: Bug inkvm_set_irq
From: Jean-Philippe Menil @ 2011-03-17 8:00 UTC (permalink / raw)
To: jean-philippe.menil; +Cc: Michael S. Tsirkin, netdev, kvm, virtualization
In-Reply-To: <4D7F7E82.4000600@univ-nantes.fr>
Le 15/03/2011 15:58, Jean-Philippe Menil a écrit :
> Le 15/03/2011 15:32, Michael S. Tsirkin a écrit :
>> On Thu, Mar 10, 2011 at 09:42:28AM +0100, Jean-Philippe Menil wrote:
>>> Le 09/03/2011 14:59, Michael S. Tsirkin a écrit :
>>>> On Wed, Mar 09, 2011 at 02:12:58PM +0100, Jean-Philippe Menil wrote:
>>>>> Le 09/03/2011 14:00, Michael S. Tsirkin a écrit :
>>>>>> On Wed, Mar 09, 2011 at 01:28:43PM +0100, Jean-Philippe Menil wrote:
>>>>>>> Le 08/03/2011 12:13, Michael S. Tsirkin a écrit :
>>>>>>>> On Fri, Mar 04, 2011 at 10:39:05AM +0100, Jean-Philippe Menil wrote:
>>>>>>>>> Yes, it's a 2.6.37.2 kernel.
>>>>>>>> OK, here's a debugging patch.
>>>>>>>> Please run with slab debugging as previously until you see
>>>>>>>> 'eventfd bug detected!' in dmesg or until there is a crash.
>>>>>>>> It might be also useful to enable timestampts on printk with
>>>>>>>> Symbol: PRINTK_TIME [=y]
>>>>>>>> │ Type : boolean
>>>>>>>> │ Prompt: Show timing information on printks
>>>>>>>>
>>>>>>>> once you see the error, please upload the
>>>>>>>> full dmesg output somewhere to we can track what
>>>>>>>> goes on.
>>>>>>>>
>>>>>>>> Hopefully there won't be an oops this time which
>>>>>>>> should make it easier for you to test (no need to
>>>>>>>> reboot).
>>>>>>>>
>>>>>>>>
>>>>>>>> diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
>>>>>>>> index c1f1e3c..3cb679b 100644
>>>>>>>> --- a/virt/kvm/eventfd.c
>>>>>>>> +++ b/virt/kvm/eventfd.c
>>>>>>>> @@ -32,6 +32,7 @@
>>>>>>>> #include<linux/eventfd.h>
>>>>>>>> #include<linux/kernel.h>
>>>>>>>> #include<linux/slab.h>
>>>>>>>> +#include<linux/nmi.h>
>>>>>>>>
>>>>>>>> #include "iodev.h"
>>>>>>>>
>>>>>>>> @@ -43,6 +44,8 @@
>>>>>>>> * --------------------------------------------------------------------
>>>>>>>> */
>>>>>>>>
>>>>>>>> +#define KVM_BAD_PTR ((void*)(long)(0x6b6b6b6b6b6b6b6bull))
>>>>>>>> +
>>>>>>>> struct _irqfd {
>>>>>>>> struct kvm *kvm;
>>>>>>>> struct eventfd_ctx *eventfd;
>>>>>>>> @@ -61,6 +64,13 @@ irqfd_inject(struct work_struct *work)
>>>>>>>> {
>>>>>>>> struct _irqfd *irqfd = container_of(work, struct _irqfd, inject);
>>>>>>>> struct kvm *kvm = irqfd->kvm;
>>>>>>>> + if (kvm == KVM_BAD_PTR) {
>>>>>>>> + printk(KERN_ERR "Eventfd bug detected!\n");
>>>>>>>> + printk(KERN_ERR "%s(work=%p,irqfd=%p,kvm=%p,gsi=%d)\n", __func__,
>>>>>>>> + work, irqfd, kvm, irqfd->gsi);
>>>>>>>> + trigger_all_cpu_backtrace();
>>>>>>>> + return;
>>>>>>>> + }
>>>>>>>>
>>>>>>>> kvm_set_irq(kvm, KVM_USERSPACE_IRQ_SOURCE_ID, irqfd->gsi, 1);
>>>>>>>> kvm_set_irq(kvm, KVM_USERSPACE_IRQ_SOURCE_ID, irqfd->gsi, 0);
>>>>>>>> @@ -75,6 +85,8 @@ irqfd_shutdown(struct work_struct *work)
>>>>>>>> struct _irqfd *irqfd = container_of(work, struct _irqfd, shutdown);
>>>>>>>> u64 cnt;
>>>>>>>>
>>>>>>>> + printk(KERN_ERR "%s(work=%p,irqfd=%p,kvm=%p, gsi=%d)\n", __func__,
>>>>>>>> + work, irqfd, irqfd->kvm, irqfd->gsi);
>>>>>>>> /*
>>>>>>>> * Synchronize with the wait-queue and unhook ourselves to prevent
>>>>>>>> * further events.
>>>>>>>> @@ -91,6 +103,8 @@ irqfd_shutdown(struct work_struct *work)
>>>>>>>> * It is now safe to release the object's resources
>>>>>>>> */
>>>>>>>> eventfd_ctx_put(irqfd->eventfd);
>>>>>>>> + printk(KERN_ERR "kfree at %s(work=%p,irqfd=%p)\n", __func__,
>>>>>>>> + work, irqfd);
>>>>>>>> kfree(irqfd);
>>>>>>>> }
>>>>>>>>
>>>>>>>> @@ -111,6 +125,8 @@ static void
>>>>>>>> irqfd_deactivate(struct _irqfd *irqfd)
>>>>>>>> {
>>>>>>>> BUG_ON(!irqfd_is_active(irqfd));
>>>>>>>> + printk(KERN_ERR "%s(irqfd=%p,kvm=%p, gsi=%d)\n", __func__,
>>>>>>>> + irqfd, irqfd->kvm, irqfd->gsi);
>>>>>>>>
>>>>>>>> list_del_init(&irqfd->list);
>>>>>>>>
>>>>>>>> @@ -178,6 +194,8 @@ kvm_irqfd_assign(struct kvm *kvm, int fd, int gsi)
>>>>>>>>
>>>>>>>> irqfd->kvm = kvm;
>>>>>>>> irqfd->gsi = gsi;
>>>>>>>> + printk(KERN_ERR "%s(irqfd=%p,kvm=%p, gsi=%d)\n", __func__,
>>>>>>>> + irqfd, kvm, gsi);
>>>>>>>> INIT_LIST_HEAD(&irqfd->list);
>>>>>>>> INIT_WORK(&irqfd->inject, irqfd_inject);
>>>>>>>> INIT_WORK(&irqfd->shutdown, irqfd_shutdown);
>>>>>>>> @@ -264,6 +282,8 @@ kvm_irqfd_deassign(struct kvm *kvm, int fd, int gsi)
>>>>>>>> struct _irqfd *irqfd, *tmp;
>>>>>>>> struct eventfd_ctx *eventfd;
>>>>>>>>
>>>>>>>> + printk(KERN_ERR "%s(kvm=%p, gsi=%d)\n", __func__,
>>>>>>>> + kvm, gsi);
>>>>>>>> eventfd = eventfd_ctx_fdget(fd);
>>>>>>>> if (IS_ERR(eventfd))
>>>>>>>> return PTR_ERR(eventfd);
>>>>>>>> @@ -305,6 +325,7 @@ void
>>>>>>>> kvm_irqfd_release(struct kvm *kvm)
>>>>>>>> {
>>>>>>>> struct _irqfd *irqfd, *tmp;
>>>>>>>> + printk(KERN_ERR "%s(kvm=%p)\n", __func__, kvm);
>>>>>>>>
>>>>>>>> spin_lock_irq(&kvm->irqfds.lock);
>>>>>>>>
>>>>>>>> --
>>>>>>>> To unsubscribe from this list: send the line "unsubscribe netdev" in
>>>>>>>> the body of a message to majordomo@vger.kernel.org
>>>>>>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>>>>>> Hi,
>>>>>>>
>>>>>>> I boot the host with the patched kernel yesterday.
>>>>>>> No crach until now, but two "Eventfd bug detected!" in the log at
>>>>>>> "Mar 9 02:04:31" and "Mar 9 02:15:17"
>>>>>>> You can find part of the log at the following adress:
>>>>>>> http://filex.univ-nantes.fr/get?k=jL4Fe7yfSMN57toAH7V
>>>>>>>
>>>>>>> It a split file of the kern.log (1,4G), so if you need another part
>>>>>>> of the log, let me know.
>>>>>>>
>>>>>>> Thanks for all.
>>>>>>>
>>>>>>> Regards.
>>>>>> Downloading, it's big :)
>>>>>> What about some 1000 lines before and after Eventfd bug detected! line?
>>>>>> --
>>>>>> To unsubscribe from this list: send the line "unsubscribe kvm" in
>>>>>> the body of a message to majordomo@vger.kernel.org
>>>>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>>>> Yes, sorry about that.
>>>>> I could have split my log into a smaller file.
>>>>>
>>>>> I was a little afraid of not transmit enough informations, and i was
>>>>> a bit wide.
>>>>> I hope you can find usefull trace anyway.
>>>>>
>>>>> Regards.
>>>> OK, use after free.
>>>>
>>>>
>>>> Mar 9 02:15:17 ayrshire.u06.univ-nantes.prive kernel: [37461.593681]
>>>> kvm_irqfd_assign(irqfd=ffff88045e8d6230,kvm=ffff88085151c000, gsi=26)
>>>> Mar 9 02:15:17 ayrshire.u06.univ-nantes.prive kernel: [37461.605359]
>>>> kvm_irqfd_deassign(kvm=ffff88085151c000, gsi=26)
>>>> Mar 9 02:15:17 ayrshire.u06.univ-nantes.prive kernel: [37461.605388]
>>>> irqfd_deactivate(irqfd=ffff88045e8d6230,kvm=ffff88085151c000, gsi=26)
>>>> Mar 9 02:15:17 ayrshire.u06.univ-nantes.prive kernel: [37461.605461]
>>>> irqfd_shutdown(work=ffff88045e8d62b0,irqfd=ffff88045e8d6230,kvm=ffff88085151c000,
>>>> gsi=26)
>>>> Mar 9 02:15:17 ayrshire.u06.univ-nantes.prive kernel: [37461.605509]
>>>> kfree at irqfd_shutdown(work=ffff88045e8d62b0,irqfd=ffff88045e8d6230)
>>>> Mar 9 02:15:17 ayrshire.u06.univ-nantes.prive kernel: [37461.605588]
>>>> Eventfd bug detected!
>>>> Mar 9 02:15:17 ayrshire.u06.univ-nantes.prive kernel: [37461.605612]
>>>> irqfd_inject(work=ffff88045e8d6290,irqfd=ffff88045e8d6230,kvm=6b6b6b6b6b6b6b6b,gsi=1802201963)
>>>>
>>>>
>>>> and 1802201963 is also 6b6b6b6b.
>>>>
>>>>
>>>> I suspect that somehow, we get an event from eventfd even
>>>> though we did eventfd_ctx_remove_wait_queue.
>>>> Could you please try the following patch on top?
>>>> When you see Eventfd bug or Wakeup bug, paste some
>>>> last lines.
>>>> For the full log file - better compress with xz.
>>>>
>>>>
>>>> diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
>>>> index 3cb679b..63aeba5 100644
>>>> --- a/virt/kvm/eventfd.c
>>>> +++ b/virt/kvm/eventfd.c
>>>> @@ -92,6 +92,8 @@ irqfd_shutdown(struct work_struct *work)
>>>> * further events.
>>>> */
>>>> eventfd_ctx_remove_wait_queue(irqfd->eventfd,&irqfd->wait,&cnt);
>>>> + printk(KERN_ERR "remove wq at %s(work=%p,irqfd=%p)\n", __func__,
>>>> + work, irqfd);
>>>>
>>>> /*
>>>> * We know no new events will be scheduled at this point, so block
>>>> @@ -142,6 +144,13 @@ irqfd_wakeup(wait_queue_t *wait, unsigned mode, int sync, void *key)
>>>> struct _irqfd *irqfd = container_of(wait, struct _irqfd, wait);
>>>> unsigned long flags = (unsigned long)key;
>>>>
>>>> + if (irqfd->kvm == KVM_BAD_PTR) {
>>>> + printk(KERN_ERR "Wakeup bug detected! flags 0x%lx\n", flags);
>>>> + printk(KERN_ERR "%s(work=%p,irqfd=%p,kvm=%p,gsi=%d)\n", __func__,
>>>> + &irqfd->inject, irqfd, irqfd->kvm, irqfd->gsi);
>>>> + trigger_all_cpu_backtrace();
>>>> + return 0;
>>>> + }
>>>> if (flags& POLLIN)
>>>> /* An event has been signaled, inject an interrupt */
>>>> schedule_work(&irqfd->inject);
>>>> @@ -153,6 +162,9 @@ irqfd_wakeup(wait_queue_t *wait, unsigned mode, int sync, void *key)
>>>>
>>>> spin_lock_irqsave(&kvm->irqfds.lock, flags);
>>>>
>>>> + printk(KERN_ERR "%s(work=%p,irqfd=%p,kvm=%p,gsi=%d,active=%d)\n", __func__,
>>>> + &irqfd->inject, irqfd, irqfd->kvm, irqfd->gsi,
>>>> + irqfd_is_active(irqfd));
>>>> /*
>>>> * We must check if someone deactivated the irqfd before
>>>> * we could acquire the irqfds.lock since the item is
>>>>
>>> Hi,
>>>
>>> I noted seven "Eventfd bug detected" events during the night, and
>>> only one Wakeup event:
>>>
>>> fifth.ah:Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.105868] Eventfd bug detected!
>>> first.ad:Mar 10 01:08:15 ayrshire.u06.univ-nantes.prive kernel:
>>> [34729.771260] Eventfd bug detected!
>>> fourth.ad:Mar 10 02:54:41 ayrshire.u06.univ-nantes.prive kernel:
>>> [41115.140873] Eventfd bug detected!
>>> second.ab:Mar 10 02:41:55 ayrshire.u06.univ-nantes.prive kernel:
>>> [40348.967192] Eventfd bug detected!
>>> seventh.ab:Mar 10 07:52:29 ayrshire.u06.univ-nantes.prive kernel:
>>> [58983.145646] Eventfd bug detected!
>>> sixth.ab:Mar 10 05:19:54 ayrshire.u06.univ-nantes.prive kernel:
>>> [49828.785558] Eventfd bug detected!
>>> third.ae:Mar 10 02:54:07 ayrshire.u06.univ-nantes.prive kernel:
>>> [41081.638633] Eventfd bug detected!
>>>
>>> grep -i wakeup *
>>> seventh.ab:Mar 10 07:52:29 ayrshire.u06.univ-nantes.prive kernel:
>>> [58983.154161] [<ffffffffa02cbf96>] vhost_poll_wakeup+0x16/0x20
>>> [vhost_net
>>>
>>>
>>> Here is a trace, for the thirst event:
>>>
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.101747]
>>> irqfd_deactivate(irqfd=ffff88042e0b5e00,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.101873] irqfd_shutdown(work=ffff88042e0b5e80,irqfd=ffff88042e0b5e00,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.101928] remove wq at
>>> irqfd_shutdown(work=ffff88042e0b5e80,irqfd=ffff88042e0b5e00)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.101990] kfree at
>>> irqfd_shutdown(work=ffff88042e0b5e80,irqfd=ffff88042e0b5e00)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.102381]
>>> kvm_irqfd_assign(irqfd=ffff88080f7aa818,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.103796] kvm_irqfd_deassign(kvm=ffff8804542d0000, gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.103833]
>>> irqfd_deactivate(irqfd=ffff88080f7aa818,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.103904] irqfd_shutdown(work=ffff88080f7aa898,irqfd=ffff88080f7aa818,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.103958] remove wq at
>>> irqfd_shutdown(work=ffff88080f7aa898,irqfd=ffff88080f7aa818)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.104023] kfree at
>>> irqfd_shutdown(work=ffff88080f7aa898,irqfd=ffff88080f7aa818)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.104311]
>>> kvm_irqfd_assign(irqfd=ffff88081a190b78,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.104511] kvm_irqfd_deassign(kvm=ffff8804542d0000, gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.104549]
>>> irqfd_deactivate(irqfd=ffff88081a190b78,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.104614] irqfd_shutdown(work=ffff88081a190bf8,irqfd=ffff88081a190b78,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.104667] remove wq at
>>> irqfd_shutdown(work=ffff88081a190bf8,irqfd=ffff88081a190b78)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.104715] kfree at
>>> irqfd_shutdown(work=ffff88081a190bf8,irqfd=ffff88081a190b78)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.104911]
>>> kvm_irqfd_assign(irqfd=ffff880853b8caa0,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.105868] Eventfd bug detected!
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.105901] irqfd_inject(work=ffff88042e0b5e60,irqfd=ffff88042e0b5e00,kvm=6b6b6b6b6b6b6b6b,gsi=1802201963)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.105951] sending NMI to all CPUs:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.105961] NMI backtrace for cpu 0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.105986] CPU 0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.105992] Modules linked in: btrfs zlib_deflate crc32c
>>> libcrc32c ufs qnx4 hfsplus hfs minix ntfs vfat msdos fat jfs
>>> reiserfs ext4 jbd2 crc16 ext3 jbd vhost_net macvtap macvlan tun veth
>>> powernow_k8 mperf cpufreq_userspace cpufreq_stats cpufreq_powersave
>>> cpufreq_ondemand freq_table cpufreq_conservative fuse xt_physdev
>>> ip6t_LOG ip6table_filter ip6_tables ipt_LOG xt_multiport xt_limit
>>> xt_tcpudp xt_state iptable_filter ip_tables x_tables
>>> nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4 nf_defrag_ipv4
>>> 8021q bridge stp ext2 mbcache dm_round_robin dm_multipath
>>> nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6 snd_pcm snd_timer
>>> snd soundcore snd_page_alloc shpchp i2c_nforce2 tpm_tis tpm
>>> pci_hotplug psmouse evdev i2c_core tpm_bios dcdbas pcspkr joydev
>>> ghes serio_raw processor thermal_sys hed button xfs exportfs dm_mod
>>> sg sr_mod cdrom usbhid hid usb_storage ses sd_mod enclosure lpfc
>>> scsi_transport_fc ohci_hcd scsi_tgt megaraid_sas scsi_mod bnx2
>>> ehci_hcd [last unloaded: scsi_wait_sca
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: n]
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.106557]
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.106581] Pid: 10, comm: kworker/0:1 Not tainted
>>> 2.6.37.2-patchjp-110308-c+ #17 Dell Inc. PowerEdge M605/0K543T
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.106644] RIP: 0010:[<ffffffff8105fa4b>] [<ffffffff8105fa4b>]
>>> default_send_IPI_mask_sequence_phys+0xbb/0xe0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.106706] RSP: 0018:ffff88045fcb1d50 EFLAGS: 00000046
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.106735] RAX: ffff88087fc00000 RBX: 0000000000000002 RCX:
>>> 0000000000000008
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.106767] RDX: 0000000000000001 RSI: 0000000000000020 RDI:
>>> 0000000000000020
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.106799] RBP: ffff88045fcb1d90 R08: ffffffff8159faf0 R09:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.106831] R10: 0000000000000000 R11: 0000000000000006 R12:
>>> 000000000000c620
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.106863] R13: ffffffff8159faf0 R14: 0000000000000400 R15:
>>> 0000000000000286
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.106896] FS: 00007f66f7754720(0000) GS:ffff88007f800000(0000)
>>> knlGS:0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.106944] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.106973] CR2: 0000000000e64048 CR3: 000000045ea45000 CR4:
>>> 00000000000006f0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.107005] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.107037] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:
>>> 0000000000000400
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.107070] Process kworker/0:1 (pid: 10, threadinfo
>>> ffff88045fcb0000, task ffff88045fcaae70)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.107117] Stack:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.107138] ffffffff00000000 0000000000000000 ffff88045fcb1d70
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] 6b6b6b6b6b6b6b6b ffff88007f814e00 ffffffff81008ba0
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] ffff88045fcb1da0 ffffffff81062c12 ffff88045fcb1dc0
>>> ffffffff8105fb3c
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff81008ba0>] ? irqfd_inject+0x0/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff81062c12>] physflat_send_IPI_all+0x12/0x20
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff8105fb3c>]
>>> arch_trigger_all_cpu_backtrace+0x3c/0x70
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff81008c2f>] irqfd_inject+0x8f/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff810a971b>] process_one_work+0x11b/0x450
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff810a9e97>] worker_thread+0x157/0x410
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff81078519>] ? __wake_up_common+0x59/0x90
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff810a9d40>] ? worker_thread+0x0/0x410
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff810ad8f6>] kthread+0x96/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff81041c64>] kernel_thread_helper+0x4/0x10
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff810ad860>] ? kthread+0x0/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff81041c60>] ? kernel_thread_helper+0x0/0x10
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] Code: 83 fb 02 44 89 f0 0f 45 c3 89 04 25 00 c3 5f ff
>>> eb 9e 4c 89 ff 57 9d 66 66 90 66 90 48 83 c4 18 5b 41 5c 41 5d 41 5e
>>> 41 5f c9 c3<48> 8b 05 4e fb 53 00 48 89 55 c8 89 4d c0 ff 90 58 01
>>> 00 00 48
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff81008ba0>] ? irqfd_inject+0x0/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff81062c12>] physflat_send_IPI_all+0x12/0x20
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff8105fb3c>]
>>> arch_trigger_all_cpu_backtrace+0x3c/0x70
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff81008c2f>] irqfd_inject+0x8f/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff810a971b>] process_one_work+0x11b/0x450
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff810a9e97>] worker_thread+0x157/0x410
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff81078519>] ? __wake_up_common+0x59/0x90
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff810a9d40>] ? worker_thread+0x0/0x410
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff810ad8f6>] kthread+0x96/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff81041c64>] kernel_thread_helper+0x4/0x10
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff810ad860>] ? kthread+0x0/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff81041c60>] ? kernel_thread_helper+0x0/0x10
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] Pid: 10, comm: kworker/0:1 Not tainted
>>> 2.6.37.2-patchjp-110308-c+ #17
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011]<NMI> [<ffffffff8104a786>] ? show_regs+0x26/0x30
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff8105fde1>] nmi_watchdog_tick+0x191/0x1b0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff81042ef1>] do_nmi+0x1c1/0x2e0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff813be5f0>] nmi+0x20/0x30
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff8105fa4b>] ?
>>> default_send_IPI_mask_sequence_phys+0xbb/0xe0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011]<<EOE>> [<ffffffff81008ba0>] ? irqfd_inject+0x0/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff81062c12>] physflat_send_IPI_all+0x12/0x20
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff8105fb3c>]
>>> arch_trigger_all_cpu_backtrace+0x3c/0x70
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff81008c2f>] irqfd_inject+0x8f/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff810a971b>] process_one_work+0x11b/0x450
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff810a9e97>] worker_thread+0x157/0x410
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff81078519>] ? __wake_up_common+0x59/0x90
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff810a9d40>] ? worker_thread+0x0/0x410
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff810ad8f6>] kthread+0x96/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff81041c64>] kernel_thread_helper+0x4/0x10
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff810ad860>] ? kthread+0x0/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108011] [<ffffffff81041c60>] ? kernel_thread_helper+0x0/0x10
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.110243] NMI backtrace for cpu 3
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.110272] CPU 3
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.110280] Modules linked in: btrfs zlib_deflate crc32c
>>> libcrc32c ufs qnx4 hfsplus hfs minix ntfs vfat msdos fat jfs
>>> reiserfs ext4 jbd2 crc16 ext3 jbd vhost_net macvtap macvlan tun veth
>>> powernow_k8 mperf cpufreq_userspace cpufreq_stats cpufreq_powersave
>>> cpufreq_ondemand freq_table cpufreq_conservative fuse xt_physdev
>>> ip6t_LOG ip6table_filter ip6_tables ipt_LOG xt_multiport xt_limit
>>> xt_tcpudp xt_state iptable_filter ip_tables x_tables
>>> nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4 nf_defrag_ipv4
>>> 8021q bridge stp ext2 mbcache dm_round_robin dm_multipath
>>> nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6 snd_pcm snd_timer
>>> snd soundcore snd_page_alloc shpchp i2c_nforce2 tpm_tis tpm
>>> pci_hotplug psmouse evdev i2c_core tpm_bios dcdbas pcspkr joydev
>>> ghes serio_raw processor thermal_sys hed button xfs exportfs dm_mod
>>> sg sr_mod cdrom usbhid hid usb_storage ses sd_mod enclosure lpfc
>>> scsi_transport_fc ohci_hcd scsi_tgt megaraid_sas scsi_mod bnx2
>>> ehci_hcd [last unloaded: scsi_wait_sca
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: n]
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.110882]
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.110906] Pid: 0, comm: kworker/0:1 Not tainted
>>> 2.6.37.2-patchjp-110308-c+ #17 Dell Inc. PowerEdge M605/0K543T
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.110970] RIP: 0010:[<ffffffff81066716>] [<ffffffff81066716>]
>>> native_safe_halt+0x6/0x10
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111030] RSP: 0018:ffff88045fcd3ea8 EFLAGS: 00000246
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111059] RAX: 0000000000000000 RBX: 0000000000000003 RCX:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111091] RDX: 0000000000000000 RSI: ffff88045fcd3ee4 RDI:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111123] RBP: ffff88045fcd3ea8 R08: 0000000000000000 R09:
>>> 0000000000000001
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111155] R10: 0000000000000000 R11: 0000000000000001 R12:
>>> ffffffff8159faf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111186] R13: 0000000000000003 R14: 0000000000000000 R15:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111220] FS: 00007fb1eafc6740(0000) GS:ffff88087fc40000(0000)
>>> knlGS:0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111268] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111297] CR2: 00007ff12a981de0 CR3: 000000045569f000 CR4:
>>> 00000000000006e0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111329] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111362] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:
>>> 0000000000000400
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111395] Process kworker/0:1 (pid: 0, threadinfo
>>> ffff88045fcd2000, task ffff88045fcca820)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111442] Stack:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111463] ffff88045fcd3ec8 ffffffff8104a016 ffff88045fcd3ee4
>>> ffffffff8159faf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111515] ffff88045fcd3ef8 ffffffff8104a168 ffff88045fcd3ee8
>>> 00000000810b3255
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111566] ffff88045fcd2010 ffffffff8159faf0 ffff88045fcd3f28
>>> ffffffff8104003b
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111618] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111648] [<ffffffff8104a016>] default_idle+0x46/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111680] [<ffffffff8104a168>] c1e_idle+0x58/0x120
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111712] [<ffffffff8104003b>] cpu_idle+0x6b/0xf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111745] [<ffffffff813b7247>] start_secondary+0x1b9/0x1be
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111774] Code: 00 00 00 00 00 55 48 89 e5 fa c9 c3 66 0f 1f 84
>>> 00 00 00 00 00 55 48 89 e5 fb c9 c3 66 0f 1f 84 00 00 00 00 00 55 48
>>> 89 e5 fb f4<c9> c3 0f 1f 84 00 00 00 00 00 55 48 89 e5 f4 c9 c3 66
>>> 0f 1f 84
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111982] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112007] [<ffffffff8104a016>] default_idle+0x46/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112038] [<ffffffff8104a168>] c1e_idle+0x58/0x120
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112069] [<ffffffff8104003b>] cpu_idle+0x6b/0xf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112099] [<ffffffff813b7247>] start_secondary+0x1b9/0x1be
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112131] Pid: 0, comm: kworker/0:1 Not tainted
>>> 2.6.37.2-patchjp-110308-c+ #17
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112176] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112198]<NMI> [<ffffffff8104a786>] ? show_regs+0x26/0x30
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112238] [<ffffffff8105fde1>] nmi_watchdog_tick+0x191/0x1b0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112272] [<ffffffff81042ef1>] do_nmi+0x1c1/0x2e0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112303] [<ffffffff813be5f0>] nmi+0x20/0x30
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112332] [<ffffffff81066716>] ? native_safe_halt+0x6/0x10
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112361]<<EOE>> [<ffffffff8104a016>] default_idle+0x46/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112399] [<ffffffff8104a168>] c1e_idle+0x58/0x120
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112430] [<ffffffff8104003b>] cpu_idle+0x6b/0xf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112460] [<ffffffff813b7247>] start_secondary+0x1b9/0x1be
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112024] NMI backtrace for cpu 2
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112024] CPU 2
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112024] Modules linked in: btrfs zlib_deflate crc32c
>>> libcrc32c ufs qnx4 hfsplus hfs minix ntfs vfat msdos fat jfs
>>> reiserfs ext4 jbd2 crc16 ext3 jbd vhost_net macvtap macvlan tun veth
>>> powernow_k8 mperf cpufreq_userspace cpufreq_stats cpufreq_powersave
>>> cpufreq_ondemand freq_table cpufreq_conservative fuse xt_physdev
>>> ip6t_LOG ip6table_filter ip6_tables ipt_LOG xt_multiport xt_limit
>>> xt_tcpudp xt_state iptable_filter ip_tables x_tables
>>> nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4 nf_defrag_ipv4
>>> 8021q bridge stp ext2 mbcache dm_round_robin dm_multipath
>>> nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6 snd_pcm snd_timer
>>> snd soundcore snd_page_alloc shpchp i2c_nforce2 tpm_tis tpm
>>> pci_hotplug psmouse evdev i2c_core tpm_bios dcdbas pcspkr joydev
>>> ghes serio_raw processor thermal_sys hed button xfs exportfs dm_mod
>>> sg sr_mod cdrom usbhid hid usb_storage ses sd_mod enclosure lpfc
>>> scsi_transport_fc ohci_hcd scsi_tgt megaraid_sas scsi_mod bnx2
>>> ehci_hcd [last unloaded: scsi_wait_sca
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: n]
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] Pid: 0, comm: kworker/0:1 Not tainted
>>> 2.6.37.2-patchjp-110308-c+ #17 Dell Inc. PowerEdge M605/0K543T
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] RIP: 0010:[<ffffffff81066716>] [<ffffffff81066716>]
>>> native_safe_halt+0x6/0x10
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] RSP: 0018:ffff88045fcc5ea8 EFLAGS: 00000246
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] RAX: 0000000000000000 RBX: 0000000000000002 RCX:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] RDX: 0000000000000000 RSI: ffff88045fcc5ee4 RDI:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] RBP: ffff88045fcc5ea8 R08: 0000000000000000 R09:
>>> 0000000000000001
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] R10: 0000000000000000 R11: 0000000000000000 R12:
>>> ffffffff8159faf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] R13: 0000000000000002 R14: 0000000000000000 R15:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] FS: 00007f66f7754720(0000) GS:ffff88007f840000(0000)
>>> knlGS:0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] CR2: 00007f241ad1f0b8 CR3: 000000045ea45000 CR4:
>>> 00000000000006f0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:
>>> 0000000000000400
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] Process kworker/0:1 (pid: 0, threadinfo
>>> ffff88045fcc4000, task ffff88045fcb87e0)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616] Stack:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] ffff88045fcc5ec8 ffffffff8104a016 ffff88045fcc5ee4
>>> ffffffff8159faf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] ffff88045fcc5ef8 ffffffff8104a168 ffff88045fcc5ee8
>>> 00000000810b3255
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] ffff88045fcc4010 ffffffff8159faf0 ffff88045fcc5f28
>>> ffffffff8104003b
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] [<ffffffff8104a016>] default_idle+0x46/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] [<ffffffff8104a168>] c1e_idle+0x58/0x120
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] [<ffffffff8104003b>] cpu_idle+0x6b/0xf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] [<ffffffff813b7247>] start_secondary+0x1b9/0x1be
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] Code: 00 00 00 00 00 55 48 89 e5 fa c9 c3 66 0f 1f 84
>>> 00 00 00 00 00 55 48 89 e5 fb c9 c3 66 0f 1f 84 00 00 00 00 00 55 48
>>> 89 e5 fb f4<c9> c3 0f 1f 84 00 00 00 00 00 55 48 89 e5 f4 c9 c3 66
>>> 0f 1f 84
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] [<ffffffff8104a016>] default_idle+0x46/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] [<ffffffff8104a168>] c1e_idle+0x58/0x120
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] [<ffffffff8104003b>] cpu_idle+0x6b/0xf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] [<ffffffff813b7247>] start_secondary+0x1b9/0x1be
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] Pid: 0, comm: kworker/0:1 Not tainted
>>> 2.6.37.2-patchjp-110308-c+ #17
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616]<NMI> [<ffffffff8104a786>] ? show_regs+0x26/0x30
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] [<ffffffff8105fde1>] nmi_watchdog_tick+0x191/0x1b0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] [<ffffffff81042ef1>] do_nmi+0x1c1/0x2e0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] [<ffffffff813be5f0>] nmi+0x20/0x30
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] [<ffffffff81066716>] ? native_safe_halt+0x6/0x10
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616]<<EOE>> [<ffffffff8104a016>] default_idle+0x46/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] [<ffffffff8104a168>] c1e_idle+0x58/0x120
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] [<ffffffff8104003b>] cpu_idle+0x6b/0xf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112616] [<ffffffff813b7247>] start_secondary+0x1b9/0x1be
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] NMI backtrace for cpu 1
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285] CPU 1
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] Modules linked in: btrfs zlib_deflate crc32c
>>> libcrc32c ufs qnx4 hfsplus hfs minix ntfs vfat msdos fat jfs
>>> reiserfs ext4 jbd2 crc16 ext3 jbd vhost_net macvtap macvlan tun veth
>>> powernow_k8 mperf cpufreq_userspace cpufreq_stats cpufreq_powersave
>>> cpufreq_ondemand freq_table cpufreq_conservative fuse xt_physdev
>>> ip6t_LOG ip6table_filter ip6_tables ipt_LOG xt_multiport xt_limit
>>> xt_tcpudp xt_state iptable_filter ip_tables x_tables
>>> nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4 nf_defrag_ipv4
>>> 8021q bridge stp ext2 mbcache dm_round_robin dm_multipath
>>> nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6 snd_pcm snd_timer
>>> snd soundcore snd_page_alloc shpchp i2c_nforce2 tpm_tis tpm
>>> pci_hotplug psmouse evdev i2c_core tpm_bios dcdbas pcspkr joydev
>>> ghes serio_raw processor thermal_sys hed button xfs exportfs dm_mod
>>> sg sr_mod cdrom usbhid hid usb_storage ses sd_mod enclosure lpfc
>>> scsi_transport_fc ohci_hcd scsi_tgt megaraid_sas scsi_mod bnx2
>>> ehci_hcd [last unloaded: scsi_wait_sca
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: n]
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] Pid: 0, comm: kworker/0:0 Not tainted
>>> 2.6.37.2-patchjp-110308-c+ #17 Dell Inc. PowerEdge M605/0K543T
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] RIP: 0010:[<ffffffff81066716>] [<ffffffff81066716>]
>>> native_safe_halt+0x6/0x10
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] RSP: 0018:ffff88045fcb3ea8 EFLAGS: 00000246
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] RAX: 0000000000000000 RBX: 0000000000000001 RCX:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] RDX: 0000000000000000 RSI: ffff88045fcb3ee4 RDI:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] RBP: ffff88045fcb3ea8 R08: 0000000000000000 R09:
>>> ffff88087fc0e408
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] R10: 000028ce70db0d2f R11: 0000000000000001 R12:
>>> ffffffff8159faf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] R13: 0000000000000001 R14: 0000000000000000 R15:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] FS: 00007fb8e1893710(0000) GS:ffff88087fc00000(0000)
>>> knlGS:0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] CR2: 00007f241aca71a0 CR3: 000000045ed50000 CR4:
>>> 00000000000006e0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:
>>> 0000000000000400
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] Process kworker/0:0 (pid: 0, threadinfo
>>> ffff88045fcb2000, task ffff88045fcaa7a0)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285] Stack:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] ffff88045fcb3ec8 ffffffff8104a016 ffff88045fcb3ee4
>>> ffffffff8159faf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] ffff88045fcb3ef8 ffffffff8104a168 ffff88045fcb3ee8
>>> 00000000810b3255
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] ffff88045fcb2010 ffffffff8159faf0 ffff88045fcb3f28
>>> ffffffff8104003b
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] [<ffffffff8104a016>] default_idle+0x46/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] [<ffffffff8104a168>] c1e_idle+0x58/0x120
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] [<ffffffff8104003b>] cpu_idle+0x6b/0xf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] [<ffffffff813b7247>] start_secondary+0x1b9/0x1be
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] Code: 00 00 00 00 00 55 48 89 e5 fa c9 c3 66 0f 1f 84
>>> 00 00 00 00 00 55 48 89 e5 fb c9 c3 66 0f 1f 84 00 00 00 00 00 55 48
>>> 89 e5 fb f4<c9> c3 0f 1f 84 00 00 00 00 00 55 48 89 e5 f4 c9 c3 66
>>> 0f 1f 84
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] [<ffffffff8104a016>] default_idle+0x46/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285]<NMI> [<ffffffff8104a786>] ? show_regs+0x26/0x30
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] [<ffffffff8105fde1>] nmi_watchdog_tick+0x191/0x1b0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] [<ffffffff813be5f0>] nmi+0x20/0x30
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285]<<EOE>> [<ffffffff8104a016>] default_idle+0x46/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] [<ffffffff8104a168>] c1e_idle+0x58/0x120
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112285] [<ffffffff8104003b>] cpu_idle+0x6b/0xf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.110896] Modules linked in: btrfs zlib_deflate crc32c
>>> libcrc32c ufs qnx4 hfsplus hfs minix ntfs vfat msdos fat jfs
>>> reiserfs ext4 jbd2 crc16 ext3 jbd vhost_net macvtap macvlan tun veth
>>> powernow_k8 mperf cpufreq_userspace cpufreq_stats cpufreq_powersave
>>> cpufreq_ondemand freq_table cpufreq_conservative fuse xt_physdev
>>> ip6t_LOG ip6table_filter ip6_tables ipt_LOG xt_multiport xt_limit
>>> xt_tcpudp xt_state iptable_filter ip_tables x_tables
>>> nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4 nf_defrag_ipv4
>>> 8021q bridge stp ext2 mbcache dm_round_robin dm_multipath
>>> nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6 snd_pcm snd_timer
>>> snd soundcore snd_page_alloc shpchp i2c_nforce2 tpm_tis tpm
>>> pci_hotplug psmouse evdev i2c_core tpm_bios dcdbas pcspkr joydev
>>> ghes serio_raw processor thermal_sys hed button xfs exportfs dm_mod
>>> sg sr_mod cdrom usbhid hid usb_storage ses sd_mod enclosure lpfc
>>> scsi_transport_fc ohci_hcd scsi_tgt megaraid_sas scsi_mod bnx2
>>> ehci_hcd [last unloaded: scsi_wait_sca
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.110896] RAX: 0000000000000000 RBX: 0000000000000005 RCX:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.110896] RDX: 0000000000000000 RSI: ffff88045fd11ee4 RDI:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.110896] ffff88045fd11ef8 ffffffff8104a168 ffff88045fd11ee8
>>> 00000000810b3255
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.110896] ffff88045fd10010 ffffffff8159faf0 ffff88045fd11f28
>>> ffffffff8104003b
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.110896] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.110896] [<ffffffff8104a016>] default_idle+0x46/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.110896] [<ffffffff8104a168>] c1e_idle+0x58/0x120
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.110896] [<ffffffff8104003b>] cpu_idle+0x6b/0xf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.110896] [<ffffffff813b7247>] start_secondary+0x1b9/0x1be
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.110896] Code: 00 00 00 00 00 55 48 89 e5 fa c9 c3 66 0f 1f 84
>>> 00 00 00 00 00 55 48 89 e5 fb c9 c3 66 0f 1f 84 00 00 00 00 00 55 48
>>> 89 e5 fb f4<c9> c3 0f 1f 84 00 00 00 00 00 55 48 89 e5 f4 c9 c3 66
>>> 0f 1f 84
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.119695] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.119695] [<ffffffff8104a016>] default_idle+0x46/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.119695] [<ffffffff8104a168>] c1e_idle+0x58/0x120
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.119695] [<ffffffff8104003b>] cpu_idle+0x6b/0xf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.119985] [<ffffffff813b7247>] start_secondary+0x1b9/0x1be
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.119985] Pid: 0, comm: kworker/0:1 Not tainted
>>> 2.6.37.2-patchjp-110308-c+ #17
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.119985] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.119985]<NMI> [<ffffffff8104a786>] ? show_regs+0x26/0x30
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.120119] [<ffffffff8105fde1>] nmi_watchdog_tick+0x191/0x1b0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.120164] [<ffffffff81042ef1>] do_nmi+0x1c1/0x2e0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112018] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112018] CR2: 00007f241ad1f0b8 CR3: 000000045ed50000 CR4:
>>> 00000000000006e0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112018] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112018] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:
>>> 0000000000000400
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112018] Process kworker/0:1 (pid: 0, threadinfo
>>> ffff88045fd00000, task ffff88045fcd8860)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112018] Stack:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112018] ffff88045fd01ec8 ffffffff8104a016 ffff88045fd01ee4
>>> ffffffff8159faf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112018] ffff88045fd01ef8 ffffffff8104a168 ffff88045fd01ee8
>>> 00000000810b3255
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112018] ffff88045fd00010 ffffffff8159faf0 ffff88045fd01f28
>>> ffffffff8104003b
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112018] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112018] [<ffffffff8104003b>] cpu_idle+0x6b/0xf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112018] [<ffffffff8104003b>] cpu_idle+0x6b/0xf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112018] [<ffffffff813b7247>] start_secondary+0x1b9/0x1be
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112018] [<ffffffff813be5f0>] nmi+0x20/0x30
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.112018] [<ffffffff813b7247>] start_secondary+0x1b9/0x1be
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.123585] NMI backtrace for cpu 7
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: n]
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.124502] RAX: 0000000000000000 RBX: 0000000000000007 RCX:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.125007] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.125206] Stack:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108015] Modules linked in: btrfs zlib_deflate crc32c
>>> libcrc32c ufs qnx4 hfsplus hfs minix ntfs vfat msdos fat jfs
>>> reiserfs ext4 jbd2 crc16 ext3 jbd vhost_net macvtap macvlan tun veth
>>> powernow_k8 mperf cpufreq_userspace cpufreq_stats cpufreq_powersave
>>> cpufreq_ondemand freq_table cpufreq_conservative fuse xt_physdev
>>> ip6t_LOG ip6table_filter ip6_tables ipt_LOG xt_multiport xt_limit
>>> xt_tcpudp xt_state iptable_filter ip_tables x_tables
>>> nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4 nf_defrag_ipv4
>>> 8021q bridge stp ext2 mbcache dm_round_robin dm_multipath
>>> nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6 snd_pcm snd_timer
>>> snd soundcore snd_page_alloc shpchp i2c_nforce2 tpm_tis tpm
>>> pci_hotplug psmouse evdev i2c_core tpm_bios dcdbas pcspkr joydev
>>> ghes serio_raw processor thermal_sys hed button xfs exportfs dm_mod
>>> sg sr_mod cdrom usbhid hid usb_storage ses sd_mod enclosure lpfc
>>> scsi_transport_fc ohci_hcd scsi_tgt megaraid_sas scsi_mod bnx2
>>> ehci_hcd [last unloaded: scsi_wait_sca
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: n]
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108015]
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108015] Pid: 0, comm: kworker/0:1 Not tainted
>>> 2.6.37.2-patchjp-110308-c+ #17 Dell Inc. PowerEdge M605/0K543T
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108015] RIP: 0010:[<ffffffff81066716>] [<ffffffff81066716>]
>>> native_safe_halt+0x6/0x10
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108015] RSP: 0018:ffff88045fd23ea8 EFLAGS: 00000246
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108015] RAX: 0000000000000000 RBX: 0000000000000006 RCX:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108015] RDX: 0000000000000000 RSI: ffff88045fd23ee4 RDI:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108015] RBP: ffff88045fd23ea8 R08: 0000000000000000 R09:
>>> ffff88007f8ce408
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108015] R10: 0000000000000000 R11: 0000000000000001 R12:
>>> ffffffff8159faf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108015] Stack:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108015] ffff88045fd23ec8 ffffffff8104a016 ffff88045fd23ee4
>>> ffffffff8159faf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108015] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108015] [<ffffffff8104003b>] cpu_idle+0x6b/0xf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108015] [<ffffffff813b7247>] start_secondary+0x1b9/0x1be
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108015] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108015] [<ffffffff8104003b>] cpu_idle+0x6b/0xf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108015] [<ffffffff813b7247>] start_secondary+0x1b9/0x1be
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108015] [<ffffffff813be5f0>] nmi+0x20/0x30
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108015] [<ffffffff8104003b>] cpu_idle+0x6b/0xf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108015] [<ffffffff813b7247>] start_secondary+0x1b9/0x1be
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] Modules linked in: btrfs zlib_deflate crc32c
>>> libcrc32c ufs qnx4 hfsplus hfs minix ntfs vfat msdos fat jfs
>>> reiserfs ext4 jbd2 crc16 ext3 jbd vhost_net macvtap macvlan tun veth
>>> powernow_k8 mperf cpufreq_userspace cpufreq_stats cpufreq_powersave
>>> cpufreq_ondemand freq_table cpufreq_conservative fuse xt_physdev
>>> ip6t_LOG ip6table_filter ip6_tables ipt_LOG xt_multiport xt_limit
>>> xt_tcpudp xt_state iptable_filter ip_tables x_tables
>>> nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4 nf_defrag_ipv4
>>> 8021q bridge stp ext2 mbcache dm_round_robin dm_multipath
>>> nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6 snd_pcm snd_timer
>>> snd soundcore snd_page_alloc shpchp i2c_nforce2 tpm_tis tpm
>>> pci_hotplug psmouse evdev i2c_core tpm_bios dcdbas pcspkr joydev
>>> ghes serio_raw processor thermal_sys hed button xfs exportfs dm_mod
>>> sg sr_mod cdrom usbhid hid usb_storage ses sd_mod enclosure lpfc
>>> scsi_transport_fc ohci_hcd scsi_tgt megaraid_sas scsi_mod bnx2
>>> ehci_hcd [last unloaded: scsi_wait_sca
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: n]
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] R10: 000028ce766a74a3 R11: 0000000000000001 R12:
>>> ffffffff8159faf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] R13: 0000000000000009 R14: 0000000000000000 R15:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] FS: 00007fa0cb316710(0000) GS:ffff88087fd00000(0000)
>>> knlGS:0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] CR2: 0000000000e64048 CR3: 000000045ea45000 CR4:
>>> 00000000000006e0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:
>>> 0000000000000400
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] Process kworker/0:1 (pid: 0, threadinfo
>>> ffff88045fd6e000, task ffff88045fd669a0)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621] Stack:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] ffff88045fd6fec8 ffffffff8104a016 ffff88045fd6fee4
>>> ffffffff8159faf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] ffff88045fd6fef8 ffffffff8104a168 ffff88045fd6fee8
>>> 00000000810b3255
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] ffff88045fd6e010 ffffffff8159faf0 ffff88045fd6ff28
>>> ffffffff8104003b
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] [<ffffffff8104a016>] default_idle+0x46/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] [<ffffffff8104a168>] c1e_idle+0x58/0x120
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] [<ffffffff8104003b>] cpu_idle+0x6b/0xf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] [<ffffffff813b7247>] start_secondary+0x1b9/0x1be
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] Code: 00 00 00 00 00 55 48 89 e5 fa c9 c3 66 0f 1f 84
>>> 00 00 00 00 00 55 48 89 e5 fb c9 c3 66 0f 1f 84 00 00 00 00 00 55 48
>>> 89 e5 fb f4<c9> c3 0f 1f 84 00 00 00 00 00 55 48 89 e5 f4 c9 c3 66
>>> 0f 1f 84
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] [<ffffffff8104a016>] default_idle+0x46/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] [<ffffffff8104a168>] c1e_idle+0x58/0x120
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] [<ffffffff8104003b>] cpu_idle+0x6b/0xf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] [<ffffffff813b7247>] start_secondary+0x1b9/0x1be
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] Pid: 0, comm: kworker/0:1 Not tainted
>>> 2.6.37.2-patchjp-110308-c+ #17
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621]<NMI> [<ffffffff8104a786>] ? show_regs+0x26/0x30
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] [<ffffffff8105fde1>] nmi_watchdog_tick+0x191/0x1b0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] [<ffffffff81042ef1>] do_nmi+0x1c1/0x2e0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] [<ffffffff813be5f0>] nmi+0x20/0x30
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] [<ffffffff81066716>] ? native_safe_halt+0x6/0x10
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621]<<EOE>> [<ffffffff8104a016>] default_idle+0x46/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] [<ffffffff8104a168>] c1e_idle+0x58/0x120
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] [<ffffffff8104003b>] cpu_idle+0x6b/0xf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.126621] [<ffffffff813b7247>] start_secondary+0x1b9/0x1be
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] NMI backtrace for cpu 11
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] CPU 11
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] Modules linked in: btrfs zlib_deflate crc32c
>>> libcrc32c ufs qnx4 hfsplus hfs minix ntfs vfat msdos fat jfs
>>> reiserfs ext4 jbd2 crc16 ext3 jbd vhost_net macvtap macvlan tun veth
>>> powernow_k8 mperf cpufreq_userspace cpufreq_stats cpufreq_powersave
>>> cpufreq_ondemand freq_table cpufreq_conservative fuse xt_physdev
>>> ip6t_LOG ip6table_filter ip6_tables ipt_LOG xt_multiport xt_limit
>>> xt_tcpudp xt_state iptable_filter ip_tables x_tables
>>> nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4 nf_defrag_ipv4
>>> 8021q bridge stp ext2 mbcache dm_round_robin dm_multipath
>>> nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6 snd_pcm snd_timer
>>> snd soundcore snd_page_alloc shpchp i2c_nforce2 tpm_tis tpm
>>> pci_hotplug psmouse evdev i2c_core tpm_bios dcdbas pcspkr joydev
>>> ghes serio_raw processor thermal_sys hed button xfs exportfs dm_mod
>>> sg sr_mod cdrom usbhid hid usb_storage ses sd_mod enclosure lpfc
>>> scsi_transport_fc ohci_hcd scsi_tgt megaraid_sas scsi_mod bnx2
>>> ehci_hcd [last unloaded: scsi_wait_sca
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: n]
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] Pid: 0, comm: kworker/0:1 Not tainted
>>> 2.6.37.2-patchjp-110308-c+ #17 Dell Inc. PowerEdge M605/0K543T
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] RIP: 0010:[<ffffffff81066716>] [<ffffffff81066716>]
>>> native_safe_halt+0x6/0x10
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] RSP: 0018:ffff88045fd8fea8 EFLAGS: 00000246
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] RAX: 0000000000000000 RBX: 000000000000000b RCX:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] RDX: 0000000000000000 RSI: ffff88045fd8fee4 RDI:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] RBP: ffff88045fd8fea8 R08: 0000000000000000 R09:
>>> ffff88087fd4e408
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] R10: 000028ce71c3578e R11: 0000000000000001 R12:
>>> ffffffff8159faf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] R13: 000000000000000b R14: 0000000000000000 R15:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] FS: 00007fa0ce156740(0000) GS:ffff88087fd40000(0000)
>>> knlGS:0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] CR2: 00007f2421c3eae0 CR3: 000000045ea45000 CR4:
>>> 00000000000006e0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:
>>> 0000000000000400
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] Process kworker/0:1 (pid: 0, threadinfo
>>> ffff88045fd8e000, task ffff88045fd86a20)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333] Stack:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] ffff88045fd8fec8 ffffffff8104a016 ffff88045fd8fee4
>>> ffffffff8159faf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] ffff88045fd8fef8 ffffffff8104a168 ffff88045fd8fee8
>>> 00000000810b3255
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] ffff88045fd8e010 ffffffff8159faf0 ffff88045fd8ff28
>>> ffffffff8104003b
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] [<ffffffff8104a016>] default_idle+0x46/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] [<ffffffff8104a168>] c1e_idle+0x58/0x120
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] [<ffffffff8104003b>] cpu_idle+0x6b/0xf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] [<ffffffff813b7247>] start_secondary+0x1b9/0x1be
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] Code: 00 00 00 00 00 55 48 89 e5 fa c9 c3 66 0f 1f 84
>>> 00 00 00 00 00 55 48 89 e5 fb c9 c3 66 0f 1f 84 00 00 00 00 00 55 48
>>> 89 e5 fb f4<c9> c3 0f 1f 84 00 00 00 00 00 55 48 89 e5 f4 c9 c3 66
>>> 0f 1f 84
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] [<ffffffff8104a016>] default_idle+0x46/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] [<ffffffff8104a168>] c1e_idle+0x58/0x120
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] [<ffffffff8104003b>] cpu_idle+0x6b/0xf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] [<ffffffff813b7247>] start_secondary+0x1b9/0x1be
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] Pid: 0, comm: kworker/0:1 Not tainted
>>> 2.6.37.2-patchjp-110308-c+ #17
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333]<NMI> [<ffffffff8104a786>] ? show_regs+0x26/0x30
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] [<ffffffff8105fde1>] nmi_watchdog_tick+0x191/0x1b0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] [<ffffffff81042ef1>] do_nmi+0x1c1/0x2e0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] [<ffffffff813be5f0>] nmi+0x20/0x30
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] [<ffffffff81066716>] ? native_safe_halt+0x6/0x10
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333]<<EOE>> [<ffffffff8104a016>] default_idle+0x46/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] [<ffffffff8104a168>] c1e_idle+0x58/0x120
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] [<ffffffff8104003b>] cpu_idle+0x6b/0xf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.111333] [<ffffffff813b7247>] start_secondary+0x1b9/0x1be
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] NMI backtrace for cpu 8
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010] CPU 8
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] Modules linked in: btrfs zlib_deflate crc32c
>>> libcrc32c ufs qnx4 hfsplus hfs minix ntfs vfat msdos fat jfs
>>> reiserfs ext4 jbd2 crc16 ext3 jbd vhost_net macvtap macvlan tun veth
>>> powernow_k8 mperf cpufreq_userspace cpufreq_stats cpufreq_powersave
>>> cpufreq_ondemand freq_table cpufreq_conservative fuse xt_physdev
>>> ip6t_LOG ip6table_filter ip6_tables ipt_LOG xt_multiport xt_limit
>>> xt_tcpudp xt_state iptable_filter ip_tables x_tables
>>> nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4 nf_defrag_ipv4
>>> 8021q bridge stp ext2 mbcache dm_round_robin dm_multipath
>>> nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6 snd_pcm snd_timer
>>> snd soundcore snd_page_alloc shpchp i2c_nforce2 tpm_tis tpm
>>> pci_hotplug psmouse evdev i2c_core tpm_bios dcdbas pcspkr joydev
>>> ghes serio_raw processor thermal_sys hed button xfs exportfs dm_mod
>>> sg sr_mod cdrom usbhid hid usb_storage ses sd_mod enclosure lpfc
>>> scsi_transport_fc ohci_hcd scsi_tgt megaraid_sas scsi_mod bnx2
>>> ehci_hcd [last unloaded: scsi_wait_sca
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: n]
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] Pid: 0, comm: kworker/0:1 Not tainted
>>> 2.6.37.2-patchjp-110308-c+ #17 Dell Inc. PowerEdge M605/0K543T
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] RIP: 0010:[<ffffffff81066716>] [<ffffffff81066716>]
>>> native_safe_halt+0x6/0x10
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] RSP: 0018:ffff88045fd63ea8 EFLAGS: 00000246
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] RAX: 0000000000000000 RBX: 0000000000000008 RCX:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] RDX: 0000000000000000 RSI: ffff88045fd63ee4 RDI:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] RBP: ffff88045fd63ea8 R08: 0000000000000000 R09:
>>> ffff88007f90e408
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] R10: 0000000000000000 R11: 0000000000000001 R12:
>>> ffffffff8159faf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] R13: 0000000000000008 R14: 0000000000000000 R15:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] FS: 00007fb8e0891710(0000) GS:ffff88007f900000(0000)
>>> knlGS:0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] CR2: 0000000000e63f28 CR3: 000000045ed50000 CR4:
>>> 00000000000006e0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:
>>> 0000000000000400
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] Process kworker/0:1 (pid: 0, threadinfo
>>> ffff88045fd62000, task ffff88045fd34960)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010] Stack:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] ffff88045fd63ec8 ffffffff8104a016 ffff88045fd63ee4
>>> ffffffff8159faf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] ffff88045fd63ef8 ffffffff8104a168 ffff88045fd63ee8
>>> 00000000810b3255
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] ffff88045fd62010 ffffffff8159faf0 ffff88045fd63f28
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.136088] kvm_irqfd_deassign(kvm=ffff8804542d0000, gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.136098]
>>> irqfd_deactivate(irqfd=ffff880853b8caa0,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] [<ffffffff813b7247>] start_secondary+0x1b9/0x1be
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] Code: 00 00 00 00 00 55 48 89 e5 fa c9 c3 66 0f 1f 84
>>> 00 00 00 00 00 55 48 89 e5 fb c9 c3 66 0f 1f 84 00 00 00 00 00 55 48
>>> 89 e5 fb f4<c9> c3 0f
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.136661] kvm_irqfd_deassign(kvm=ffff8804542d0000, gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.136665]
>>> irqfd_deactivate(irqfd=ffff880810a21e00,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.136702] irqfd_shutdown(work=ffff880810a21e80,irqfd=ffff880810a21e00,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.136709] remove wq at
>>> irqfd_shutdown(work=ffff880810a21e80,irqfd=ffff880810a21e00)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.136715] kfree at
>>> irqfd_shutdown(work=ffff880810a21e80,irqfd=ffff880810a21e00)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] 1f 84 00 00 00
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.136910]
>>> kvm_irqfd_assign(irqfd=ffff880853b8caa0,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] 00 00 55 48 89 e5 f4 c9 c3 66 0f 1f 84
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] [<ffffffff8104a016>] default_idle+0x46/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] [<ffffffff8104a168>] c1e_idle+0x58/0x120
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.108010] [<ffffffff8104003b>] cpu_idle+0x6b/0xf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.136975] Pid: 0, comm: kworker/0:1 Not tainted
>>> 2.6.37.2-patchjp-110308-c+ #17
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.136975] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.136975]<NMI> [<ffffffff8104a786>] ? show_regs+0x26/0x30
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.136975] [<ffffffff8105fde1>] nmi_watchdog_tick+0x191/0x1b0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.136975] [<ffffffff813be5f0>] nmi+0x20/0x30
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.136975] [<ffffffff81066716>] ? native_safe_halt+0x6/0x10
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.120004] FS: 00007f2787814700(0000) GS:ffff88007f940000(0000)
>>> knlGS:0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.120004] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.120004] CR2: 0000000000e63f28 CR3: 000000045ea45000 CR4:
>>> 00000000000006e0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.120004] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
>>> 0000000000000000
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.120004] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:
>>> 0000000000000400
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.120004] Process kworker/0:1 (pid: 0, threadinfo
>>> ffff88045fd80000, task ffff88045fd769e0)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.120004] Stack:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.120004] ffff88045fd81ec8 ffffffff8104a016 ffff88045fd81ee4
>>> ffffffff8159faf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.120004] ffff88045fd81ef8 ffffffff8104a168 ffff88045fd81ee8
>>> 00000000810b3255
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.120004] ffff88045fd80010 ffffffff8159faf0 ffff88045fd81f28
>>> ffffffff8104003b
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.120004] Call Trace:
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.120004] [<ffffffff8104a016>] default_idle+0x46/0xa0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.120004] [<ffffffff8104003b>] cpu_idle+0x6b/0xf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.120004] [<ffffffff813b7247>] start_secondary+0x1b9/0x1be
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.120004] [<ffffffff8104003b>] cpu_idle+0x6b/0xf0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.120004] [<ffffffff813b7247>] start_secondary+0x1b9/0x1be
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.120004] [<ffffffff81042ef1>] do_nmi+0x1c1/0x2e0
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.120004] [<ffffffff813b7247>] start_secondary+0x1b9/0x1be
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.148658] kvm_irqfd_deassign(kvm=ffff8804542d0000, gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.148687]
>>> irqfd_deactivate(irqfd=ffff880853b8caa0,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.148759] irqfd_shutdown(work=ffff880853b8cb20,irqfd=ffff880853b8caa0,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.148814] remove wq at
>>> irqfd_shutdown(work=ffff880853b8cb20,irqfd=ffff880853b8caa0)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.148862] kfree at
>>> irqfd_shutdown(work=ffff880853b8cb20,irqfd=ffff880853b8caa0)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.149086]
>>> kvm_irqfd_assign(irqfd=ffff88081a190b78,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.149379] kvm_irqfd_deassign(kvm=ffff8804542d0000, gsi=48)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.149416]
>>> irqfd_deactivate(irqfd=ffff88045efd3740,kvm=ffff8804542d0000,
>>> gsi=48)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.149540] irqfd_shutdown(work=ffff88045efd37c0,irqfd=ffff88045efd3740,kvm=ffff8804542d0000,
>>> gsi=48)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.149594] remove wq at
>>> irqfd_shutdown(work=ffff88045efd37c0,irqfd=ffff88045efd3740)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.149643] kfree at
>>> irqfd_shutdown(work=ffff88045efd37c0,irqfd=ffff88045efd3740)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.149922]
>>> kvm_irqfd_assign(irqfd=ffff88080f7aa818,kvm=ffff8804542d0000,
>>> gsi=48)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.171869] kvm_irqfd_deassign(kvm=ffff8804542d0000, gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.171907]
>>> irqfd_deactivate(irqfd=ffff88081a190b78,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.171989] irqfd_shutdown(work=ffff88081a190bf8,irqfd=ffff88081a190b78,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.172111] remove wq at
>>> irqfd_shutdown(work=ffff88081a190bf8,irqfd=ffff88081a190b78)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.172160] kfree at
>>> irqfd_shutdown(work=ffff88081a190bf8,irqfd=ffff88081a190b78)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.172493]
>>> kvm_irqfd_assign(irqfd=ffff88083b062308,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.172672] kvm_irqfd_deassign(kvm=ffff8804542d0000, gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.172710]
>>> irqfd_deactivate(irqfd=ffff88083b062308,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.172782] irqfd_shutdown(work=ffff88083b062388,irqfd=ffff88083b062308,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.172836] remove wq at
>>> irqfd_shutdown(work=ffff88083b062388,irqfd=ffff88083b062308)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.172884] kfree at
>>> irqfd_shutdown(work=ffff88083b062388,irqfd=ffff88083b062308)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.173074]
>>> kvm_irqfd_assign(irqfd=ffff88081a190230,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.175303] kvm_irqfd_deassign(kvm=ffff8804542d0000, gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.175339]
>>> irqfd_deactivate(irqfd=ffff88081a190230,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.175466] irqfd_shutdown(work=ffff88081a1902b0,irqfd=ffff88081a190230,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.175521] remove wq at
>>> irqfd_shutdown(work=ffff88081a1902b0,irqfd=ffff88081a190230)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.175569] kfree at
>>> irqfd_shutdown(work=ffff88081a1902b0,irqfd=ffff88081a190230)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.175769]
>>> kvm_irqfd_assign(irqfd=ffff88045eabb668,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.176002] kvm_irqfd_deassign(kvm=ffff8804542d0000, gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.176058]
>>> irqfd_deactivate(irqfd=ffff88045eabb668,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.176122] irqfd_shutdown(work=ffff88045eabb6e8,irqfd=ffff88045eabb668,kvm=ffff8804542d0000,
>>> gsi=24)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.176177] remove wq at
>>> irqfd_shutdown(work=ffff88045eabb6e8,irqfd=ffff88045eabb668)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.176225] kfree at
>>> irqfd_shutdown(work=ffff88045eabb6e8,irqfd=ffff88045eabb668)
>>> Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
>>> [44867.176427]
>>> kvm_irqfd_assign(irqfd=ffff88045ed96c50,kvm=ffff8804542d0000, gsi=24
>>>
>>>
>>> You can find all the trace at the following adress:
>>> http://filex.univ-nantes.fr/get?k=R94kna5sckVmdvCoKsn
>>>
>>> It's a tar.gz of seven file, from 100k to 200k each ;)
>>>
>>> Again, thanks a lot for the time you spent on this.
>>>
>>> Regards.
>> Are you running a preemptible kernel?
>> Does the following help at all?
>>
>> diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
>> index 2ca4535..cdf51c9 100644
>> --- a/virt/kvm/eventfd.c
>> +++ b/virt/kvm/eventfd.c
>> @@ -90,7 +90,7 @@ irqfd_shutdown(struct work_struct *work)
>> * We know no new events will be scheduled at this point, so block
>> * until all previously outstanding events have completed
>> */
>> - flush_work(&irqfd->inject);
>> + flush_work_sync(&irqfd->inject);
>>
>> /*
>> * It is now safe to release the object's resources
>>
> Hi,
>
> thanks for the response.
>
> root@ayrshire:~# zcat /proc/config.gz | grep -i preempt
> # CONFIG_PREEMPT_RCU is not set
> CONFIG_PREEMPT_NOTIFIERS=y
> CONFIG_PREEMPT_NONE=y
> # CONFIG_PREEMPT_VOLUNTARY is not set
> # CONFIG_PREEMPT is not set
>
> It does not seem to be a preemptible kernel.
>
> I will test tour patch, and report the result.
>
> Regards.
>
Hi,
i reboot the host with the "flush_work_sync", yesterday at lunchtime.
I haven't see "Eventfd bug detected" or "Wakeup bug detected" until now.
The modification seem to do the trick.
So, if my understand is correct, flush_work flush the last irqfd, but in
my case, antoher irqfd was still queued to a cpu?
Is that right?
Regards.
--
Jean-Philippe Menil - Pôle réseau Service IRTS
DSI Université de Nantes
jean-philippe.menil@univ-nantes.fr
Tel : 02.53.48.49.27 - Fax : 02.53.48.49.09
^ permalink raw reply
* Re: build breakage due to br_multicast.c referencing ipv6_dev_get_saddr()
From: Jan Beulich @ 2011-03-17 8:01 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: davem, bridge, netdev, linus.luessing
In-Reply-To: <20110316082441.45db3018@nehalam>
>>> On 16.03.11 at 16:24, Stephen Hemminger <shemminger@linux-foundation.org>
wrote:
> On Wed, 16 Mar 2011 12:34:19 +0000
> "Jan Beulich" <JBeulich@novell.com> wrote:
>
>> With BRIDGE=y and IPV6=m commit
>> fe29ec41aaa51902aebd63658dfb04fe6fea8be5 ("bridge: Use IPv6
>> link-local address for multicast listener queries") causes the build to
>> break.
>
> Rather than continue with the config games, lets just make the necessary
> ipv6 pieces accessible.
The below (however ugly it may look) seems to do the trick for me,
for this particular symbol. Possibly other symbols need doing the
same (didn't check which ones e.g. infiniband depends on), so
some sort of abstraction might be desirable to make the whole
thing look less ugly.
Jan
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -78,7 +78,21 @@ extern struct inet6_ifaddr *ipv6_ge
struct net_device *dev,
int strict);
-extern int ipv6_dev_get_saddr(struct net *net,
+#ifdef CONFIG_IPV6_MODULE
+static inline int ipv6_dev_get_saddr_stub(struct net *net,
+ struct net_device *dev,
+ const struct in6_addr *daddr,
+ unsigned int srcprefs,
+ struct in6_addr *saddr)
+{
+ return -EPROTONOSUPPORT;
+}
+
+extern int (*ipv6_dev_get_saddr)
+#else
+extern int ipv6_dev_get_saddr
+#endif
+ (struct net *net,
struct net_device *dev,
const struct in6_addr *daddr,
unsigned int srcprefs,
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -1119,9 +1119,14 @@ out:
return ret;
}
-int ipv6_dev_get_saddr(struct net *net, struct net_device *dst_dev,
- const struct in6_addr *daddr, unsigned int prefs,
- struct in6_addr *saddr)
+#ifdef MODULE
+static int _ipv6_dev_get_saddr
+#else
+int ipv6_dev_get_saddr
+#endif
+ (struct net *net, struct net_device *dst_dev,
+ const struct in6_addr *daddr, unsigned int prefs,
+ struct in6_addr *saddr)
{
struct ipv6_saddr_score scores[2],
*score = &scores[0], *hiscore = &scores[1];
@@ -1244,7 +1249,6 @@ try_nextdev:
in6_ifa_put(hiscore->ifa);
return 0;
}
-EXPORT_SYMBOL(ipv6_dev_get_saddr);
int ipv6_get_lladdr(struct net_device *dev, struct in6_addr *addr,
unsigned char banned_flags)
@@ -4720,6 +4724,10 @@ int __init addrconf_init(void)
ipv6_addr_label_rtnl_register();
+#ifdef MODULE
+ ipv6_dev_get_saddr = _ipv6_dev_get_saddr;
+#endif
+
return 0;
errout:
rtnl_af_unregister(&inet6_ops);
@@ -4738,6 +4746,10 @@ void addrconf_cleanup(void)
struct net_device *dev;
int i;
+#ifdef MODULE
+ ipv6_dev_get_saddr = ipv6_dev_get_saddr_stub;
+#endif
+
unregister_netdevice_notifier(&ipv6_dev_notf);
unregister_pernet_subsys(&addrconf_ops);
ipv6_addr_label_cleanup();
--- a/net/ipv6/addrconf_core.c
+++ b/net/ipv6/addrconf_core.c
@@ -3,10 +3,17 @@
* not configured or static.
*/
+#include <net/addrconf.h>
#include <net/ipv6.h>
#define IPV6_ADDR_SCOPE_TYPE(scope) ((scope) << 16)
+#ifdef CONFIG_IPV6_MODULE
+typeof(ipv6_dev_get_saddr) __read_mostly ipv6_dev_get_saddr
+ = ipv6_dev_get_saddr_stub;
+#endif
+EXPORT_SYMBOL_GPL(ipv6_dev_get_saddr);
+
static inline unsigned ipv6_addr_scope2type(unsigned scope)
{
switch(scope) {
^ permalink raw reply
* [PATCH] Add useful per-connection TCP stats for diagnosis purpose.
From: H.K. Jerry Chu @ 2011-03-17 8:06 UTC (permalink / raw)
To: netdev; +Cc: Jerry Chu
From: Jerry Chu <hkchu@google.com>
This patch add a number of very useful counters/stats (defined in
tcp_stats.h) to help diagnosing TCP related problems.
create_time - when the connection was created (in jiffies)
total_inbytes - total inbytes as consumed by the receiving apps.
total_outbytes - total outbytes sent down from the transmitting apps.
total_outdatasegs - total data carrying segments sent so far, including
retransmitted ones.
total_xmit - total accumulated time (usecs) when the connection
has something to send.
total_retrans_time - total time (usecs, accumulated) the connection
spends trying to recover lost packets. For each
loss event the time is measured from the lost packet
was first sent till the retransmitted packet was
eventually ack'ed.
total_cwnd_limit - total time (usecs, excluding time spent on loss
recovery) the xmit is stopped due to cwnd limited
total_swnd_limit - total time (usecs) theconnection is swnd limited
The following two counters are for listeners only:
accepted_reqs - total # of accepted connection requests.
listen_drops - total # of dropped SYN reqs (SYN cookies excluded) due
to listener's queue overflow.
total_retrans_time/total_retrans ratio gives a rough picture of how
quickly in average the connection can recover from a pkt loss. E.g.,
when the network is more congested, or the traffic contains mainly
smaller RPC where tail drop often requires RTO to recover,
the total_retrans_time/total_retrans ratio tends to be higher.
Currently the new counters/stats are exported through /proc/net/tcp.
Some simple, abbreviated field names have been added to the output of
/proc/net/tcp in order to allow backward/forward compatibility in the
future. Obviously the new counters/stats can also be easily exported
through other APIs.
Signed-off-by: H.K. Jerry Chu <hkchu@google.com>
---
include/linux/ktime.h | 3 ++
include/linux/tcp.h | 1 +
include/net/tcp_stats.h | 65 ++++++++++++++++++++++++++++++++++++++++++++++
net/ipv4/tcp.c | 30 ++++++++++++++++++---
net/ipv4/tcp_input.c | 13 +++++++++
net/ipv4/tcp_ipv4.c | 41 ++++++++++++++++++++++++++---
net/ipv4/tcp_minisocks.c | 9 ++++++
net/ipv4/tcp_output.c | 47 +++++++++++++++++++++++++++++++--
net/ipv6/tcp_ipv6.c | 8 +++++
9 files changed, 206 insertions(+), 11 deletions(-)
create mode 100644 include/net/tcp_stats.h
diff --git a/include/linux/ktime.h b/include/linux/ktime.h
index e1ceaa9..e60e758 100644
--- a/include/linux/ktime.h
+++ b/include/linux/ktime.h
@@ -333,6 +333,9 @@ extern void ktime_get_ts(struct timespec *ts);
/* Get the real (wall-) time in timespec format: */
#define ktime_get_real_ts(ts) getnstimeofday(ts)
+#define ktime_since(a) ktime_to_us(ktime_sub(ktime_get(), (a)))
+#define ktime_zero(a) ktime_equal((a), ktime_set(0, 0))
+
static inline ktime_t ns_to_ktime(u64 ns)
{
static const ktime_t ktime_zero = { .tv64 = 0 };
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index e64f4c6..ea5cb5d 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -460,6 +460,7 @@ struct tcp_sock {
* contains related tcp_cookie_transactions fields.
*/
struct tcp_cookie_values *cookie_values;
+ struct tcp_stats *conn_stats;
};
static inline struct tcp_sock *tcp_sk(const struct sock *sk)
diff --git a/include/net/tcp_stats.h b/include/net/tcp_stats.h
new file mode 100644
index 0000000..f17cdac
--- /dev/null
+++ b/include/net/tcp_stats.h
@@ -0,0 +1,65 @@
+#ifndef _TCP_STATS_H_
+#define _TCP_STATS_H_
+
+#include <linux/types.h>
+#include <linux/ktime.h>
+
+/*
+ * The following is a list of per connection counters/stats:
+ *
+ * create_time - when the connection was created (in jiffies)
+ * total_inbytes - total inbytes as consumed by the receiving apps.
+ * total_outbytes - total outbytes sent down from the transmitting apps.
+ * total_outdatasegs - total data carrying segments sent so far,
+ * including retransmitted ones.
+ * total_xmit - total accumulated time (usecs) when the connection has
+ something to send.
+ * total_retrans_time - total time (usecs, accumulated) the connection
+ * spends trying to recover lost packets. For each loss
+ * event the time is measured from the lost packet was
+ * first sent till the retransmitted packet was eventually
+ * ack'ed.
+ * total_cwnd_limit - total time (usecs, excluding time spent on loss
+ * recovery) the xmit is stopped due to cwnd limited
+ * total_swnd_limit - total time (usecs) theconnection is swnd limited
+ *
+ * The following two counters are for listeners only:
+ * accepted_reqs - total # of accepted connection requests.
+ * listen_drops - total # of dropped SYN reqs (SYN cookies excluded) due
+ * to listener's queue overflow.
+ */
+
+#define create_time conn_stats->ts_create_time
+#define total_inbytes conn_stats->ts_total_inbytes
+#define total_outbytes conn_stats->ts_total_outbytes
+#define total_outdatasegs conn_stats->ts_total_outdatasegs
+#define start_xmit conn_stats->ts_start_xmit
+#define total_xmit conn_stats->ts_total_xmit
+#define start_cwnd_limit conn_stats->ts_start_cwnd_limit
+#define total_cwnd_limit conn_stats->ts_total_cwnd_limit
+#define start_swnd_limit conn_stats->ts_start_swnd_limit
+#define total_swnd_limit conn_stats->ts_total_swnd_limit
+#define start_retrans conn_stats->ts_start_retrans
+#define total_retrans_time conn_stats->ts_total_retrans_time
+#define accepted_reqs conn_stats->ts_total_inbytes
+#define listen_drops conn_stats->ts_total_outbytes
+/* # of dropped SYN reqs (SYN cookies excluded) due to q/q0 overflow */
+
+struct tcp_stats {
+ u64 ts_create_time; /* in jiffies */
+ u64 ts_total_inbytes;
+ u64 ts_total_outbytes;
+ u64 ts_total_outdatasegs;
+ ktime_t ts_start_xmit;
+ u64 ts_total_xmit; /* in usecs */
+ ktime_t ts_start_swnd_limit;
+ u64 ts_total_swnd_limit; /* in usecs */
+ ktime_t ts_start_cwnd_limit;
+ u64 ts_total_cwnd_limit; /* in usecs */
+ ktime_t ts_start_retrans;
+ u64 ts_total_retrans_time; /* in usecs */
+};
+
+extern struct kmem_cache *tcp_statsp;
+
+#endif /* _TCP_STATS_H_ */
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index b22d450..9d0d582 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -273,6 +273,7 @@
#include <net/ip.h>
#include <net/netdma.h>
#include <net/sock.h>
+#include <net/tcp_stats.h>
#include <asm/uaccess.h>
#include <asm/ioctls.h>
@@ -317,6 +318,10 @@ struct tcp_splice_state {
int tcp_memory_pressure __read_mostly;
EXPORT_SYMBOL(tcp_memory_pressure);
+/* Memory cache for TCP stats structure */
+struct kmem_cache *tcp_statsp __read_mostly;
+EXPORT_SYMBOL(tcp_statsp);
+
void tcp_enter_memory_pressure(struct sock *sk)
{
if (!tcp_memory_pressure) {
@@ -543,6 +548,12 @@ static inline void skb_entail(struct sock *sk, struct sk_buff *skb)
tcb->flags = TCPHDR_ACK;
tcb->sacked = 0;
skb_header_release(skb);
+
+ if (sk->sk_write_queue.qlen == 0) {
+ WARN_ON(!ktime_zero(tp->start_xmit));
+ tp->start_xmit = ktime_get();
+ }
+
tcp_add_write_queue_tail(sk, skb);
sk->sk_wmem_queued += skb->truesize;
sk_mem_charge(sk, skb->truesize);
@@ -860,8 +871,10 @@ wait_for_memory:
}
out:
- if (copied)
+ if (copied) {
tcp_push(sk, flags, mss_now, tp->nonagle);
+ tp->total_outbytes += copied;
+ }
return copied;
do_error:
@@ -1108,8 +1121,10 @@ wait_for_memory:
}
out:
- if (copied)
+ if (copied) {
tcp_push(sk, flags, mss_now, tp->nonagle);
+ tp->total_outbytes += copied;
+ }
release_sock(sk);
return copied;
@@ -1387,8 +1402,10 @@ int tcp_read_sock(struct sock *sk, read_descriptor_t *desc,
tcp_rcv_space_adjust(sk);
/* Clean up data we have read: This will do ACK frames. */
- if (copied > 0)
+ if (copied > 0) {
+ tp->total_inbytes += copied;
tcp_cleanup_rbuf(sk, copied);
+ }
return copied;
}
EXPORT_SYMBOL(tcp_read_sock);
@@ -1768,7 +1785,8 @@ skip_copy:
/* Clean up data we have read: This will do ACK frames. */
tcp_cleanup_rbuf(sk, copied);
-
+ if (copied > 0)
+ tp->total_inbytes += copied;
release_sock(sk);
return copied;
@@ -2101,6 +2119,8 @@ int tcp_disconnect(struct sock *sk, int flags)
inet_csk_delack_init(sk);
tcp_init_send_head(sk);
memset(&tp->rx_opt, 0, sizeof(tp->rx_opt));
+ memset(tp->conn_stats, 0, sizeof(struct tcp_stats));
+ tp->create_time = get_jiffies_64();
__sk_dst_reset(sk);
WARN_ON(inet->inet_num && !icsk->icsk_bind_hash);
@@ -3314,4 +3334,6 @@ void __init tcp_init(void)
tcp_secret_primary = &tcp_secret_one;
tcp_secret_retiring = &tcp_secret_two;
tcp_secret_secondary = &tcp_secret_two;
+ tcp_statsp = kmem_cache_create("tcp_stats_cache",
+ sizeof(struct tcp_stats), 0, SLAB_HWCACHE_ALIGN, NULL);
}
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index da782e7..fa3d8e4 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -72,6 +72,7 @@
#include <linux/ipsec.h>
#include <asm/unaligned.h>
#include <net/netdma.h>
+#include <net/tcp_stats.h>
int sysctl_tcp_timestamps __read_mostly = 1;
int sysctl_tcp_window_scaling __read_mostly = 1;
@@ -3688,9 +3689,21 @@ static int tcp_ack(struct sock *sk, struct sk_buff *skb, int flag)
if (!prior_packets)
goto no_queue;
+ if (!ktime_zero(tp->start_retrans) &&
+ !before(tp->snd_una, tp->high_seq)) {
+ tp->total_retrans_time += ktime_since(tp->start_retrans);
+ tp->start_retrans = net_invalid_timestamp();
+ }
+
/* See if we can take anything off of the retransmit queue. */
flag |= tcp_clean_rtx_queue(sk, prior_fackets, prior_snd_una);
+ if (sk->sk_write_queue.qlen == 0 &&
+ !ktime_zero(tp->start_xmit)) {
+ tp->total_xmit += ktime_since(tp->start_xmit);
+ tp->start_xmit = net_invalid_timestamp();
+ }
+
if (tp->frto_counter)
frto_cwnd = tcp_process_frto(sk, flag);
/* Guarantee sacktag reordering detection against wrap-arounds */
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index f7e6c2c..bb14df2 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -72,6 +72,7 @@
#include <net/timewait_sock.h>
#include <net/xfrm.h>
#include <net/netdma.h>
+#include <net/tcp_stats.h>
#include <linux/inet.h>
#include <linux/ipv6.h>
@@ -1391,6 +1392,8 @@ drop_and_release:
drop_and_free:
reqsk_free(req);
drop:
+ if (!want_cookie)
+ tp->listen_drops++;
return 0;
}
EXPORT_SYMBOL(tcp_v4_conn_request);
@@ -1582,6 +1585,7 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb)
rsk = nsk;
goto reset;
}
+ tcp_sk(sk)->accepted_reqs++;
return 0;
}
} else
@@ -1830,6 +1834,13 @@ static int tcp_v4_init_sock(struct sock *sk)
struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk);
+ tp->conn_stats = kmem_cache_alloc(tcp_statsp, GFP_KERNEL);
+ if (tp->conn_stats == NULL)
+ return -1;
+
+ memset(tp->conn_stats, 0, sizeof(struct tcp_stats));
+ tp->create_time = get_jiffies_64();
+
skb_queue_head_init(&tp->out_of_order_queue);
tcp_init_xmit_timers(sk);
tcp_prequeue_init(tp);
@@ -1937,7 +1948,10 @@ void tcp_v4_destroy_sock(struct sock *sk)
tcp_cookie_values_release);
tp->cookie_values = NULL;
}
-
+ if (tp->conn_stats) {
+ kmem_cache_free(tcp_statsp, tp->conn_stats);
+ tp->conn_stats = NULL;
+ }
percpu_counter_dec(&tcp_sockets_allocated);
}
EXPORT_SYMBOL(tcp_v4_destroy_sock);
@@ -2390,6 +2404,8 @@ static void get_tcp4_sock(struct sock *sk, struct seq_file *f, int i, int *len)
__u16 destp = ntohs(inet->inet_dport);
__u16 srcp = ntohs(inet->inet_sport);
int rx_queue;
+ int len1;
+ unsigned long elapsed;
if (icsk->icsk_pending == ICSK_TIME_RETRANS) {
timer_active = 1;
@@ -2413,8 +2429,10 @@ static void get_tcp4_sock(struct sock *sk, struct seq_file *f, int i, int *len)
*/
rx_queue = max_t(int, tp->rcv_nxt - tp->copied_seq, 0);
+ elapsed = (unsigned long)(get_jiffies_64() - tp->create_time);
+
seq_printf(f, "%4d: %08X:%04X %08X:%04X %02X %08X:%08X %02X:%08lX "
- "%08X %5d %8d %lu %d %p %lu %lu %u %u %d%n",
+ "%08X %5d %8d %lu %d %p %lu %lu %u %u %d %u %n",
i, src, srcp, dest, destp, sk->sk_state,
tp->write_seq - tp->snd_una,
rx_queue,
@@ -2430,7 +2448,20 @@ static void get_tcp4_sock(struct sock *sk, struct seq_file *f, int i, int *len)
(icsk->icsk_ack.quick << 1) | icsk->icsk_ack.pingpong,
tp->snd_cwnd,
tcp_in_initial_slowstart(tp) ? -1 : tp->snd_ssthresh,
+ jiffies_to_msecs(elapsed)/1000,
len);
+
+ if (sk->sk_state == TCP_LISTEN)
+ seq_printf(f, "%llu %llu%n", tp->accepted_reqs,
+ tp->listen_drops, &len1);
+ else
+ seq_printf(f, "%llu %llu %llu %llu %llu/%u %llu %llu%n",
+ tp->total_inbytes, tp->total_outbytes,
+ tp->total_outdatasegs, tp->total_xmit/1000,
+ tp->total_retrans_time/1000, tp->total_retrans,
+ tp->total_swnd_limit/1000, tp->total_cwnd_limit/1000,
+ &len1);
+ *len += len1;
}
static void get_timewait4_sock(struct inet_timewait_sock *tw,
@@ -2455,7 +2486,7 @@ static void get_timewait4_sock(struct inet_timewait_sock *tw,
atomic_read(&tw->tw_refcnt), tw, len);
}
-#define TMPSZ 150
+#define TMPSZ 160
static int tcp4_seq_show(struct seq_file *seq, void *v)
{
@@ -2466,7 +2497,9 @@ static int tcp4_seq_show(struct seq_file *seq, void *v)
seq_printf(seq, "%-*s\n", TMPSZ - 1,
" sl local_address rem_address st tx_queue "
"rx_queue tr tm->when retrnsmt uid timeout "
- "inode");
+ "inode - "
+ "elps ib ob odsg xmt_bz rtrns_tm/rtrns "
+ "swn_lmt cwn_lmt");
goto out;
}
st = seq->private;
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
index 80b1f80..abc6e23 100644
--- a/net/ipv4/tcp_minisocks.c
+++ b/net/ipv4/tcp_minisocks.c
@@ -26,6 +26,7 @@
#include <net/tcp.h>
#include <net/inet_common.h>
#include <net/xfrm.h>
+#include <net/tcp_stats.h>
int sysctl_tcp_syncookies __read_mostly = 1;
EXPORT_SYMBOL(sysctl_tcp_syncookies);
@@ -433,6 +434,14 @@ struct sock *tcp_create_openreq_child(struct sock *sk, struct request_sock *req,
struct tcp_sock *oldtp = tcp_sk(sk);
struct tcp_cookie_values *oldcvp = oldtp->cookie_values;
+ newtp->conn_stats = kmem_cache_alloc(tcp_statsp, GFP_ATOMIC);
+ if (newtp->conn_stats == NULL) {
+ sock_put(newsk);
+ return NULL;
+ }
+ memset(newtp->conn_stats, 0, sizeof(struct tcp_stats));
+ newtp->create_time = get_jiffies_64();
+
/* TCP Cookie Transactions require space for the cookie pair,
* as it differs for each connection. There is no need to
* copy any s_data_payload stored at the original socket.
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index dfa5beb..ec846d3 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -35,6 +35,7 @@
*/
#include <net/tcp.h>
+#include <net/tcp_stats.h>
#include <linux/compiler.h>
#include <linux/gfp.h>
@@ -826,6 +827,21 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
tcb = TCP_SKB_CB(skb);
memset(&opts, 0, sizeof(opts));
+ if (!ktime_zero(tp->start_cwnd_limit) ||
+ !ktime_zero(tp->start_swnd_limit)) {
+ /* update total_xmit periodically */
+ WARN_ON(ktime_zero(tp->start_xmit));
+ tp->total_xmit += ktime_since(tp->start_xmit);
+ tp->start_xmit = ktime_get();
+ }
+ if (!ktime_zero(tp->start_cwnd_limit)) {
+ tp->total_cwnd_limit += ktime_since(tp->start_cwnd_limit);
+ tp->start_cwnd_limit = net_invalid_timestamp();
+ } else if (!ktime_zero(tp->start_swnd_limit)) {
+ tp->total_swnd_limit += ktime_since(tp->start_swnd_limit);
+ tp->start_swnd_limit = net_invalid_timestamp();
+ }
+
if (unlikely(tcb->flags & TCPHDR_SYN))
tcp_options_size = tcp_syn_options(sk, skb, &opts, &md5);
else
@@ -892,8 +908,10 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
if (likely(tcb->flags & TCPHDR_ACK))
tcp_event_ack_sent(sk, tcp_skb_pcount(skb));
- if (skb->len != tcp_header_size)
+ if (skb->len != tcp_header_size) {
tcp_event_data_sent(tp, skb, sk);
+ tp->total_outdatasegs += tcp_skb_pcount(skb);
+ }
if (after(tcb->end_seq, tp->snd_nxt) || tcb->seq == tcb->end_seq)
TCP_ADD_STATS(sock_net(sk), TCP_MIB_OUTSEGS,
@@ -903,6 +921,9 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
if (likely(err <= 0))
return err;
+ if (ktime_zero(tp->start_retrans))
+ tp->start_retrans = ktime_get();
+
tcp_enter_cwr(sk, 1);
return net_xmit_eval(err);
@@ -1759,11 +1780,19 @@ static int tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,
BUG_ON(!tso_segs);
cwnd_quota = tcp_cwnd_test(tp, skb);
- if (!cwnd_quota)
+ if (!cwnd_quota) {
+ if (ktime_zero(tp->start_cwnd_limit) &&
+ inet_csk(sk)->icsk_ca_state == TCP_CA_Open)
+ tp->start_cwnd_limit = ktime_get();
break;
+ }
- if (unlikely(!tcp_snd_wnd_test(tp, skb, mss_now)))
+ if (unlikely(!tcp_snd_wnd_test(tp, skb, mss_now))) {
+ if (ktime_zero(tp->start_swnd_limit) &&
+ inet_csk(sk)->icsk_ca_state == TCP_CA_Open)
+ tp->start_swnd_limit = ktime_get();
break;
+ }
if (tso_segs == 1) {
if (unlikely(!tcp_nagle_test(tp, skb, mss_now,
@@ -2134,6 +2163,18 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb)
}
}
+ if (ktime_zero(tp->start_retrans)) {
+ unsigned int since_last = jiffies_to_usecs(tcp_time_stamp
+ - TCP_SKB_CB(skb)->when);
+
+ tp->start_cwnd_limit = net_invalid_timestamp();
+ tp->start_swnd_limit = net_invalid_timestamp();
+ /* Stop counting cwnd/swnd_limit when we get into retrans */
+ tp->start_retrans = ktime_get();
+ tp->start_retrans = ktime_sub_us(tp->start_retrans,
+ since_last);
+ }
+
/* Make a copy, if the first transmission SKB clone we made
* is still in somebody's hands, else make a clone.
*/
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 2b0c186..30db33a 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -61,6 +61,7 @@
#include <net/timewait_sock.h>
#include <net/netdma.h>
#include <net/inet_common.h>
+#include <net/tcp_stats.h>
#include <asm/uaccess.h>
@@ -1950,6 +1951,13 @@ static int tcp_v6_init_sock(struct sock *sk)
struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk);
+ tp->conn_stats = kmem_cache_alloc(tcp_statsp, GFP_KERNEL);
+ if (tp->conn_stats == NULL)
+ return -1;
+
+ memset(tp->conn_stats, 0, sizeof(struct tcp_stats));
+ tp->create_time = get_jiffies_64();
+
skb_queue_head_init(&tp->out_of_order_queue);
tcp_init_xmit_timers(sk);
tcp_prequeue_init(tp);
--
1.7.3.1
^ permalink raw reply related
* Re: Bug inkvm_set_irq
From: Michael S. Tsirkin @ 2011-03-17 8:21 UTC (permalink / raw)
To: Jean-Philippe Menil; +Cc: netdev, kvm, virtualization
In-Reply-To: <4D81BF9E.5090503@univ-nantes.fr>
On Thu, Mar 17, 2011 at 09:00:30AM +0100, Jean-Philippe Menil wrote:
> >>Are you running a preemptible kernel?
> >>Does the following help at all?
> >>
> >>diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
> >>index 2ca4535..cdf51c9 100644
> >>--- a/virt/kvm/eventfd.c
> >>+++ b/virt/kvm/eventfd.c
> >>@@ -90,7 +90,7 @@ irqfd_shutdown(struct work_struct *work)
> >> * We know no new events will be scheduled at this point, so block
> >> * until all previously outstanding events have completed
> >> */
> >>- flush_work(&irqfd->inject);
> >>+ flush_work_sync(&irqfd->inject);
> >>
> >> /*
> >> * It is now safe to release the object's resources
> >>
> >Hi,
> >
> >thanks for the response.
> >
> >root@ayrshire:~# zcat /proc/config.gz | grep -i preempt
> ># CONFIG_PREEMPT_RCU is not set
> >CONFIG_PREEMPT_NOTIFIERS=y
> >CONFIG_PREEMPT_NONE=y
> ># CONFIG_PREEMPT_VOLUNTARY is not set
> ># CONFIG_PREEMPT is not set
> >
> >It does not seem to be a preemptible kernel.
> >
> >I will test tour patch, and report the result.
> >
> >Regards.
> >
> Hi,
>
> i reboot the host with the "flush_work_sync", yesterday at lunchtime.
> I haven't see "Eventfd bug detected" or "Wakeup bug detected" until now.
>
> The modification seem to do the trick.
>
> So, if my understand is correct, flush_work flush the last irqfd,
> but in my case, antoher irqfd was still queued to a cpu?
> Is that right?
>
> Regards.
Yes, it says:
* flush_work - wait for a work to finish executing the last queueing instance
* @work: the work to flush
*
* Wait until @work has finished execution. This function considers
* only the last queueing instance of @work. If @work has been
* enqueued across different CPUs on a non-reentrant workqueue or on
* multiple workqueues, @work might still be executing on return on
* some of the CPUs from earlier queueing.
*
* If @work was queued only on a non-reentrant, ordered or unbound
* workqueue, @work is guaranteed to be idle on return if it hasn't
* been requeued since flush started.
kvm uses the default workqueue which is non-reentrant.
Thanks to Gleb for the suggestion!
--
MST
^ permalink raw reply
* Re: build breakage due to br_multicast.c referencing ipv6_dev_get_saddr()
From: Eric Dumazet @ 2011-03-17 8:23 UTC (permalink / raw)
To: Jan Beulich; +Cc: Stephen Hemminger, davem, bridge, netdev, linus.luessing
In-Reply-To: <4D81CDF6020000780003700B@vpn.id2.novell.com>
Le jeudi 17 mars 2011 à 08:01 +0000, Jan Beulich a écrit :
> >>> On 16.03.11 at 16:24, Stephen Hemminger <shemminger@linux-foundation.org>
> wrote:
> > On Wed, 16 Mar 2011 12:34:19 +0000
> > "Jan Beulich" <JBeulich@novell.com> wrote:
> >
> >> With BRIDGE=y and IPV6=m commit
> >> fe29ec41aaa51902aebd63658dfb04fe6fea8be5 ("bridge: Use IPv6
> >> link-local address for multicast listener queries") causes the build to
> >> break.
> >
> > Rather than continue with the config games, lets just make the necessary
> > ipv6 pieces accessible.
>
> The below (however ugly it may look) seems to do the trick for me,
> for this particular symbol. Possibly other symbols need doing the
> same (didn't check which ones e.g. infiniband depends on), so
> some sort of abstraction might be desirable to make the whole
> thing look less ugly.
You should check how things are properly done with RCU, because you must
make sure the module unload wont delete text another cpu is using.
net code usually use synchronize_{rcu|net}() calls.
example :
net/ipv4/netfilter/nf_nat_sip.c
static void __exit nf_nat_sip_fini(void)
{
rcu_assign_pointer(nf_nat_sip_hook, NULL);
rcu_assign_pointer(nf_nat_sip_seq_adjust_hook, NULL);
rcu_assign_pointer(nf_nat_sip_expect_hook, NULL);
rcu_assign_pointer(nf_nat_sdp_addr_hook, NULL);
rcu_assign_pointer(nf_nat_sdp_port_hook, NULL);
rcu_assign_pointer(nf_nat_sdp_session_hook, NULL);
rcu_assign_pointer(nf_nat_sdp_media_hook, NULL);
synchronize_rcu();
}
^ permalink raw reply
* Re: [PATCH] Add useful per-connection TCP stats for diagnosis purpose.
From: Eric Dumazet @ 2011-03-17 8:42 UTC (permalink / raw)
To: H.K. Jerry Chu; +Cc: netdev
In-Reply-To: <1300349189-2731-1-git-send-email-hkchu@google.com>
Le jeudi 17 mars 2011 à 01:06 -0700, H.K. Jerry Chu a écrit :
> From: Jerry Chu <hkchu@google.com>
>
> This patch add a number of very useful counters/stats (defined in
> tcp_stats.h) to help diagnosing TCP related problems.
>
> create_time - when the connection was created (in jiffies)
> total_inbytes - total inbytes as consumed by the receiving apps.
> total_outbytes - total outbytes sent down from the transmitting apps.
>
> total_outdatasegs - total data carrying segments sent so far, including
> retransmitted ones.
>
> total_xmit - total accumulated time (usecs) when the connection
> has something to send.
>
> total_retrans_time - total time (usecs, accumulated) the connection
> spends trying to recover lost packets. For each
> loss event the time is measured from the lost packet
> was first sent till the retransmitted packet was
> eventually ack'ed.
>
> total_cwnd_limit - total time (usecs, excluding time spent on loss
> recovery) the xmit is stopped due to cwnd limited
>
> total_swnd_limit - total time (usecs) theconnection is swnd limited
>
> The following two counters are for listeners only:
>
> accepted_reqs - total # of accepted connection requests.
> listen_drops - total # of dropped SYN reqs (SYN cookies excluded) due
> to listener's queue overflow.
>
> total_retrans_time/total_retrans ratio gives a rough picture of how
> quickly in average the connection can recover from a pkt loss. E.g.,
> when the network is more congested, or the traffic contains mainly
> smaller RPC where tail drop often requires RTO to recover,
> the total_retrans_time/total_retrans ratio tends to be higher.
>
> Currently the new counters/stats are exported through /proc/net/tcp.
Please dont. Use iproute2 instead.
> Some simple, abbreviated field names have been added to the output of
> /proc/net/tcp in order to allow backward/forward compatibility in the
> future. Obviously the new counters/stats can also be easily exported
> through other APIs.
>
/proc/net/tcp is legacy. You should touch it eventually, but after
"other APIS" are done. It was the old way (quick but a bit ugly)
> Signed-off-by: H.K. Jerry Chu <hkchu@google.com>
> ---
> include/linux/ktime.h | 3 ++
> include/linux/tcp.h | 1 +
> include/net/tcp_stats.h | 65 ++++++++++++++++++++++++++++++++++++++++++++++
> net/ipv4/tcp.c | 30 ++++++++++++++++++---
> net/ipv4/tcp_input.c | 13 +++++++++
> net/ipv4/tcp_ipv4.c | 41 ++++++++++++++++++++++++++---
> net/ipv4/tcp_minisocks.c | 9 ++++++
> net/ipv4/tcp_output.c | 47 +++++++++++++++++++++++++++++++--
> net/ipv6/tcp_ipv6.c | 8 +++++
> 9 files changed, 206 insertions(+), 11 deletions(-)
> create mode 100644 include/net/tcp_stats.h
>
> diff --git a/include/linux/ktime.h b/include/linux/ktime.h
> index e1ceaa9..e60e758 100644
> --- a/include/linux/ktime.h
> +++ b/include/linux/ktime.h
> @@ -333,6 +333,9 @@ extern void ktime_get_ts(struct timespec *ts);
> /* Get the real (wall-) time in timespec format: */
> #define ktime_get_real_ts(ts) getnstimeofday(ts)
Hmm, this kind of changes are out of netdev scope and should be avoided
>
> +#define ktime_since(a) ktime_to_us(ktime_sub(ktime_get(), (a)))
us are implied in ktime_since() ? thats strange.
> +#define ktime_zero(a) ktime_equal((a), ktime_set(0, 0))
ktime_zero() sounds like : "give me zero time" or "clear the ktime
field".
> +
> static inline ktime_t ns_to_ktime(u64 ns)
> {
> static const ktime_t ktime_zero = { .tv64 = 0 };
> diff --git a/include/linux/tcp.h b/include/linux/tcp.h
> index e64f4c6..ea5cb5d 100644
> --- a/include/linux/tcp.h
> +++ b/include/linux/tcp.h
> @@ -460,6 +460,7 @@ struct tcp_sock {
> * contains related tcp_cookie_transactions fields.
> */
> struct tcp_cookie_values *cookie_values;
> + struct tcp_stats *conn_stats;
> };
Really, using separate cache lines to store some stats is expensive.
You should add counters in existing structure, to avoid additional cache
line dirties. Carefully placing stats in already dirtied cache lines.
You also should use native ktime_t infrastructure, to make the maths
really fast in fast path.
Only when stats are to be returned to user, you'll have to convert the
native timestamps to user exportable ones.
Quite frankly, using u64 fields allow nanosec resolution.
BTW, we probably could 'export' sk->sk_drops for TCP, like we do for
UDP.
^ permalink raw reply
* Re: [PATCHv2 3/9] macb: unify at91 and avr32 platform data
From: avictor.za @ 2011-03-17 8:43 UTC (permalink / raw)
To: Peter Korsgaard
Cc: Jamie Iles, netdev, plagnioj, nicolas.ferre, linux-arm-kernel
In-Reply-To: <87vczkmy94.fsf@macbook.be.48ers.dk>
hi,
> Jamie> Both at91 and avr32 defines its own platform data structure for
> Jamie> the macb driver and both share common structures though at91
> Jamie> includes a currently unused phy_irq_pin. Create a common
> Jamie> eth_platform_data for macb that both at91 and avr32 can use. In
> Jamie> future we can use this to support other architectures that use the
> Jamie> same IP block with the macb driver.
>
> How about at the same time renaming it to something a bit less generic
> like macb_platform_data?
The AT91RM9200 uses the same platform_data structure, but has a
different Ethernet peripheral (ie, not the MACB)
The phy_irq_pin is used in the AT91RM9200 ethernet driver.
(drivers/net/arm/at91_ether.c)
Regards,
Andrew Victor
^ permalink raw reply
* Re: [PATCHv2 3/9] macb: unify at91 and avr32 platform data
From: Peter Korsgaard @ 2011-03-17 8:48 UTC (permalink / raw)
To: avictor.za@gmail.com
Cc: Jamie Iles, netdev, plagnioj, nicolas.ferre, linux-arm-kernel
In-Reply-To: <AANLkTi=TiRnc0ceosH-P7fN7wKrLZE0MCJHQ30gM_Q9b@mail.gmail.com>
>>>>> "avictor" == avictor za@gmail com <avictor.za@gmail.com> writes:
Hi,
>> How about at the same time renaming it to something a bit less
>> generic like macb_platform_data?
avictor> The AT91RM9200 uses the same platform_data structure, but has a
avictor> different Ethernet peripheral (ie, not the MACB)
avictor> The phy_irq_pin is used in the AT91RM9200 ethernet driver.
avictor> (drivers/net/arm/at91_ether.c)
That should probably be cleaned up as well then. Sharing platform_data
structures between unrelated drivers seems like quite a mess to me.
--
Bye, Peter Korsgaard
^ permalink raw reply
* Re: [PATCHv2 3/9] macb: unify at91 and avr32 platform data
From: Russell King - ARM Linux @ 2011-03-17 8:58 UTC (permalink / raw)
To: Peter Korsgaard
Cc: avictor.za@gmail.com, Jamie Iles, plagnioj, linux-arm-kernel,
nicolas.ferre, netdev
In-Reply-To: <871v26m8tf.fsf@macbook.be.48ers.dk>
On Thu, Mar 17, 2011 at 09:48:28AM +0100, Peter Korsgaard wrote:
> >>>>> "avictor" == avictor za@gmail com <avictor.za@gmail.com> writes:
>
> Hi,
>
> >> How about at the same time renaming it to something a bit less
> >> generic like macb_platform_data?
>
> avictor> The AT91RM9200 uses the same platform_data structure, but has a
> avictor> different Ethernet peripheral (ie, not the MACB)
>
> avictor> The phy_irq_pin is used in the AT91RM9200 ethernet driver.
> avictor> (drivers/net/arm/at91_ether.c)
>
> That should probably be cleaned up as well then. Sharing platform_data
> structures between unrelated drivers seems like quite a mess to me.
Why should every driver have a separate platform data structure?
Is it right to end up with thousands of unique data structures each
specific to a particular driver? To me, that sounds like a headache
waiting to happen.
^ permalink raw reply
* Re: [PATCHv2 1/9] at91: provide macb clks with "pclk" and "hclk" name
From: Andrew Victor @ 2011-03-17 9:22 UTC (permalink / raw)
To: Russell King - ARM Linux
Cc: nicolas.ferre, Jamie Iles, plagnioj, linux-arm-kernel, netdev
In-Reply-To: <20110316083844.GA13262@n2100.arm.linux.org.uk>
hi Russell,
>> There is no reference to a "pclk" or "hclk" in the AT91 architecture.
>> So to avoid possible confusion, maybe create two "fake" clocks both
>> parented to "macb_clk", and add a comment they're only for
>> compatibility with the AVR32.
>
> It doesn't matter what's in the documentation.
>
> What matters more than conforming to documentation is keeping the drivers
> in a clean and maintainable state without throwing lots of ifdefs into
> them.
I'm not saying the drivers need ifdefs, they should request both
"pclk" and "hclk" as suggested.
What I was suggesting is the platform clock setup on AT91 as:
macb_clk
|
+-- hclk
+-- pclk
rather than:
pclk
|
+-- hclk
Regards,
Andrew Victor
^ permalink raw reply
* Re: [PATCHv2 3/9] macb: unify at91 and avr32 platform data
From: Peter Korsgaard @ 2011-03-17 9:22 UTC (permalink / raw)
To: Russell King - ARM Linux
Cc: avictor.za@gmail.com, Jamie Iles, plagnioj, linux-arm-kernel,
nicolas.ferre, netdev
In-Reply-To: <20110317085835.GC29758@n2100.arm.linux.org.uk>
>>>>> "Russell" == Russell King <- ARM Linux <linux@arm.linux.org.uk>> writes:
Hi,
>> That should probably be cleaned up as well then. Sharing platform_data
>> structures between unrelated drivers seems like quite a mess to me.
Russell> Why should every driver have a separate platform data structure?
Russell> Is it right to end up with thousands of unique data structures each
Russell> specific to a particular driver? To me, that sounds like a headache
Russell> waiting to happen.
Well, the point of the platform data is to provide driver specific
(E.G. not generic) data to the driver, so in general it will be
different for different hardware.
The current situation with 2 different structure defination depending on
arch, macro magic and 1 of these structures also used for a 2nd driver
isn't optimal.
But ok, I don't feel strongly about struct macb_platform_data also being
used for the old at91_ether driver, but it shouldn't be called
eth_platform_data as it isn't really a generic structure.
--
Bye, Peter Korsgaard
^ permalink raw reply
* Re: [PATCHv2 3/9] macb: unify at91 and avr32 platform data
From: Jamie Iles @ 2011-03-17 9:34 UTC (permalink / raw)
To: Peter Korsgaard
Cc: Russell King - ARM Linux, avictor.za@gmail.com, Jamie Iles,
plagnioj, linux-arm-kernel, nicolas.ferre, netdev
In-Reply-To: <87wrjyksnm.fsf@macbook.be.48ers.dk>
On Thu, Mar 17, 2011 at 10:22:53AM +0100, Peter Korsgaard wrote:
> >>>>> "Russell" == Russell King <- ARM Linux <linux@arm.linux.org.uk>> writes:
>
> Hi,
>
> >> That should probably be cleaned up as well then. Sharing platform_data
> >> structures between unrelated drivers seems like quite a mess to me.
>
> Russell> Why should every driver have a separate platform data structure?
> Russell> Is it right to end up with thousands of unique data structures each
> Russell> specific to a particular driver? To me, that sounds like a headache
> Russell> waiting to happen.
>
> Well, the point of the platform data is to provide driver specific
> (E.G. not generic) data to the driver, so in general it will be
> different for different hardware.
>
> The current situation with 2 different structure defination depending on
> arch, macro magic and 1 of these structures also used for a 2nd driver
> isn't optimal.
>
> But ok, I don't feel strongly about struct macb_platform_data also being
> used for the old at91_ether driver, but it shouldn't be called
> eth_platform_data as it isn't really a generic structure.
Ok, I'll rename to macb_platform_data and update at91_ether to use that
with a comment describing that we're sharing the platform data with
macb. At least that gets rid of the preprocessor stuff in board.h for
at91 too.
Jamie
^ permalink raw reply
* [PATCH v2] net: add Faraday FTGMAC100 Gigabit Ethernet driver
From: Po-Yu Chuang @ 2011-03-17 9:47 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel, ratbert, eric.dumazet
In-Reply-To: <1299744517-1896-1-git-send-email-ratbert.chuang@gmail.com>
From: Po-Yu Chuang <ratbert@faraday-tech.com>
FTGMAC100 Ethernet Media Access Controller supports 10/100/1000 Mbps
and MII/GMII. This driver has been working on some ARM/NDS32 SoC's
including Faraday A369 and Andes AG102.
Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
---
v2:
fix checkpatch.pl found error
use GFP_ATOMIC allocations where needed
drivers/net/Kconfig | 9 +
drivers/net/Makefile | 1 +
drivers/net/ftgmac100.c | 1365 +++++++++++++++++++++++++++++++++++++++++++++++
drivers/net/ftgmac100.h | 246 +++++++++
4 files changed, 1621 insertions(+), 0 deletions(-)
create mode 100644 drivers/net/ftgmac100.c
create mode 100644 drivers/net/ftgmac100.h
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 6b12274..b9da914 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2560,6 +2560,15 @@ config PCH_GBE
to Gigabit Ethernet.
This driver enables Gigabit Ethernet function.
+config FTGMAC100
+ tristate "Faraday FTGMAC100 Gigabit Ethernet support"
+ depends on ARM
+ select PHYLIB
+ help
+ This driver supports the FTGMAC100 Gigabit Ethernet controller
+ from Faraday. It is used on Faraday A369, Andes AG102 and some
+ other ARM/NDS32 SoC's.
+
endif # NETDEV_1000
#
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 7c21711..a349b26 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -147,6 +147,7 @@ obj-$(CONFIG_FORCEDETH) += forcedeth.o
obj-$(CONFIG_NE_H8300) += ne-h8300.o 8390.o
obj-$(CONFIG_AX88796) += ax88796.o
obj-$(CONFIG_BCM63XX_ENET) += bcm63xx_enet.o
+obj-$(CONFIG_FTGMAC100) += ftgmac100.o
obj-$(CONFIG_FTMAC100) += ftmac100.o
obj-$(CONFIG_TSI108_ETH) += tsi108_eth.o
diff --git a/drivers/net/ftgmac100.c b/drivers/net/ftgmac100.c
new file mode 100644
index 0000000..5b01c5f
--- /dev/null
+++ b/drivers/net/ftgmac100.c
@@ -0,0 +1,1365 @@
+/*
+ * Faraday FTGMAC100 Gigabit Ethernet
+ *
+ * (C) Copyright 2009-2011 Faraday Technology
+ * Po-Yu Chuang <ratbert@faraday-tech.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
+#include <linux/dma-mapping.h>
+#include <linux/etherdevice.h>
+#include <linux/ethtool.h>
+#include <linux/init.h>
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/netdevice.h>
+#include <linux/phy.h>
+#include <linux/platform_device.h>
+#include <net/ip.h>
+
+#include "ftgmac100.h"
+
+#define DRV_NAME "ftgmac100"
+#define DRV_VERSION "0.6"
+
+#define RX_QUEUE_ENTRIES 256 /* must be power of 2 */
+#define TX_QUEUE_ENTRIES 512 /* must be power of 2 */
+
+#define MAX_PKT_SIZE 1518
+#define RX_BUF_SIZE PAGE_SIZE /* must be smaller than 0x3fff */
+
+/******************************************************************************
+ * private data
+ *****************************************************************************/
+struct ftgmac100_descs {
+ struct ftgmac100_rxdes rxdes[RX_QUEUE_ENTRIES];
+ struct ftgmac100_txdes txdes[TX_QUEUE_ENTRIES];
+};
+
+struct ftgmac100 {
+ struct resource *res;
+ void __iomem *base;
+ int irq;
+
+ struct ftgmac100_descs *descs;
+ dma_addr_t descs_dma_addr;
+
+ unsigned int rx_pointer;
+ unsigned int tx_clean_pointer;
+ unsigned int tx_pointer;
+ unsigned int tx_pending;
+
+ spinlock_t tx_lock;
+
+ struct net_device *netdev;
+ struct device *dev;
+ struct napi_struct napi;
+
+ struct mii_bus *mii_bus;
+ int phy_irq[PHY_MAX_ADDR];
+ struct phy_device *phydev;
+ int old_speed;
+};
+
+static int ftgmac100_alloc_rx_page(struct ftgmac100 *priv,
+ struct ftgmac100_rxdes *rxdes, gfp_t gfp);
+
+/******************************************************************************
+ * internal functions (hardware register access)
+ *****************************************************************************/
+#define INT_MASK_ALL_ENABLED (FTGMAC100_INT_RPKT_LOST | \
+ FTGMAC100_INT_XPKT_ETH | \
+ FTGMAC100_INT_XPKT_LOST | \
+ FTGMAC100_INT_AHB_ERR | \
+ FTGMAC100_INT_PHYSTS_CHG | \
+ FTGMAC100_INT_RPKT_BUF | \
+ FTGMAC100_INT_NO_RXBUF)
+
+static void ftgmac100_set_rx_ring_base(struct ftgmac100 *priv, dma_addr_t addr)
+{
+ iowrite32(addr, priv->base + FTGMAC100_OFFSET_RXR_BADR);
+}
+
+static void ftgmac100_set_rx_buffer_size(struct ftgmac100 *priv,
+ unsigned int size)
+{
+ size = FTGMAC100_RBSR_SIZE(size);
+ iowrite32(size, priv->base + FTGMAC100_OFFSET_RBSR);
+}
+
+static void ftgmac100_set_normal_prio_tx_ring_base(struct ftgmac100 *priv,
+ dma_addr_t addr)
+{
+ iowrite32(addr, priv->base + FTGMAC100_OFFSET_NPTXR_BADR);
+}
+
+static void ftgmac100_txdma_normal_prio_start_polling(struct ftgmac100 *priv)
+{
+ iowrite32(1, priv->base + FTGMAC100_OFFSET_NPTXPD);
+}
+
+static int ftgmac100_reset_hw(struct ftgmac100 *priv)
+{
+ struct net_device *netdev = priv->netdev;
+ int i;
+
+ /* NOTE: reset clears all registers */
+ iowrite32(FTGMAC100_MACCR_SW_RST, priv->base + FTGMAC100_OFFSET_MACCR);
+ for (i = 0; i < 5; i++) {
+ unsigned int maccr;
+
+ maccr = ioread32(priv->base + FTGMAC100_OFFSET_MACCR);
+ if (!(maccr & FTGMAC100_MACCR_SW_RST))
+ return 0;
+
+ usleep_range(1000, 10000);
+ }
+
+ netdev_err(netdev, "software reset failed\n");
+ return -EIO;
+}
+
+static void ftgmac100_set_mac(struct ftgmac100 *priv, const unsigned char *mac)
+{
+ unsigned int maddr = mac[0] << 8 | mac[1];
+ unsigned int laddr = mac[2] << 24 | mac[3] << 16 | mac[4] << 8 | mac[5];
+
+ iowrite32(maddr, priv->base + FTGMAC100_OFFSET_MAC_MADR);
+ iowrite32(laddr, priv->base + FTGMAC100_OFFSET_MAC_LADR);
+}
+
+static void ftgmac100_init_hw(struct ftgmac100 *priv)
+{
+ /* setup ring buffer base registers */
+ ftgmac100_set_rx_ring_base(priv,
+ priv->descs_dma_addr +
+ offsetof(struct ftgmac100_descs, rxdes));
+ ftgmac100_set_normal_prio_tx_ring_base(priv,
+ priv->descs_dma_addr +
+ offsetof(struct ftgmac100_descs, txdes));
+
+ ftgmac100_set_rx_buffer_size(priv, RX_BUF_SIZE);
+
+ iowrite32(FTGMAC100_APTC_RXPOLL_CNT(1), priv->base + FTGMAC100_OFFSET_APTC);
+
+ ftgmac100_set_mac(priv, priv->netdev->dev_addr);
+}
+
+#define MACCR_ENABLE_ALL (FTGMAC100_MACCR_TXDMA_EN | \
+ FTGMAC100_MACCR_RXDMA_EN | \
+ FTGMAC100_MACCR_TXMAC_EN | \
+ FTGMAC100_MACCR_RXMAC_EN | \
+ FTGMAC100_MACCR_FULLDUP | \
+ FTGMAC100_MACCR_CRC_APD | \
+ FTGMAC100_MACCR_RX_RUNT | \
+ FTGMAC100_MACCR_RX_BROADPKT)
+
+static void ftgmac100_start_hw(struct ftgmac100 *priv, int speed)
+{
+ int maccr = MACCR_ENABLE_ALL;
+
+ switch (speed) {
+ default:
+ case 10:
+ break;
+
+ case 100:
+ maccr |= FTGMAC100_MACCR_FAST_MODE;
+ break;
+
+ case 1000:
+ maccr |= FTGMAC100_MACCR_GIGA_MODE;
+ break;
+ }
+
+ iowrite32(maccr, priv->base + FTGMAC100_OFFSET_MACCR);
+}
+
+static void ftgmac100_stop_hw(struct ftgmac100 *priv)
+{
+ iowrite32(0, priv->base + FTGMAC100_OFFSET_MACCR);
+}
+
+/******************************************************************************
+ * internal functions (receive descriptor)
+ *****************************************************************************/
+static bool ftgmac100_rxdes_first_segment(struct ftgmac100_rxdes *rxdes)
+{
+ return rxdes->rxdes0 & cpu_to_le32(FTGMAC100_RXDES0_FRS);
+}
+
+static bool ftgmac100_rxdes_last_segment(struct ftgmac100_rxdes *rxdes)
+{
+ return rxdes->rxdes0 & cpu_to_le32(FTGMAC100_RXDES0_LRS);
+}
+
+static bool ftgmac100_rxdes_packet_ready(struct ftgmac100_rxdes *rxdes)
+{
+ return rxdes->rxdes0 & cpu_to_le32(FTGMAC100_RXDES0_RXPKT_RDY);
+}
+
+static void ftgmac100_rxdes_set_dma_own(struct ftgmac100_rxdes *rxdes)
+{
+ /* clear status bits */
+ rxdes->rxdes0 &= cpu_to_le32(FTGMAC100_RXDES0_EDORR);
+}
+
+static bool ftgmac100_rxdes_rx_error(struct ftgmac100_rxdes *rxdes)
+{
+ return rxdes->rxdes0 & cpu_to_le32(FTGMAC100_RXDES0_RX_ERR);
+}
+
+static bool ftgmac100_rxdes_crc_error(struct ftgmac100_rxdes *rxdes)
+{
+ return rxdes->rxdes0 & cpu_to_le32(FTGMAC100_RXDES0_CRC_ERR);
+}
+
+static bool ftgmac100_rxdes_frame_too_long(struct ftgmac100_rxdes *rxdes)
+{
+ return rxdes->rxdes0 & cpu_to_le32(FTGMAC100_RXDES0_FTL);
+}
+
+static bool ftgmac100_rxdes_runt(struct ftgmac100_rxdes *rxdes)
+{
+ return rxdes->rxdes0 & cpu_to_le32(FTGMAC100_RXDES0_RUNT);
+}
+
+static bool ftgmac100_rxdes_odd_nibble(struct ftgmac100_rxdes *rxdes)
+{
+ return rxdes->rxdes0 & cpu_to_le32(FTGMAC100_RXDES0_RX_ODD_NB);
+}
+
+static unsigned int ftgmac100_rxdes_data_length(struct ftgmac100_rxdes *rxdes)
+{
+ return le32_to_cpu(rxdes->rxdes0) & FTGMAC100_RXDES0_VDBC;
+}
+
+static bool ftgmac100_rxdes_multicast(struct ftgmac100_rxdes *rxdes)
+{
+ return rxdes->rxdes0 & cpu_to_le32(FTGMAC100_RXDES0_MULTICAST);
+}
+
+static void ftgmac100_rxdes_set_end_of_ring(struct ftgmac100_rxdes *rxdes)
+{
+ rxdes->rxdes0 |= cpu_to_le32(FTGMAC100_RXDES0_EDORR);
+}
+
+static void ftgmac100_rxdes_set_dma_addr(struct ftgmac100_rxdes *rxdes,
+ dma_addr_t addr)
+{
+ rxdes->rxdes3 = cpu_to_le32(addr);
+}
+
+static dma_addr_t ftgmac100_rxdes_get_dma_addr(struct ftgmac100_rxdes *rxdes)
+{
+ return le32_to_cpu(rxdes->rxdes3);
+}
+
+static bool ftgmac100_rxdes_is_tcp(struct ftgmac100_rxdes *rxdes)
+{
+ return (rxdes->rxdes1 & cpu_to_le32(FTGMAC100_RXDES1_PROT_MASK)) ==
+ cpu_to_le32(FTGMAC100_RXDES1_PROT_TCPIP);
+}
+
+static bool ftgmac100_rxdes_is_udp(struct ftgmac100_rxdes *rxdes)
+{
+ return (rxdes->rxdes1 & cpu_to_le32(FTGMAC100_RXDES1_PROT_MASK)) ==
+ cpu_to_le32(FTGMAC100_RXDES1_PROT_UDPIP);
+}
+
+static bool ftgmac100_rxdes_tcpcs_err(struct ftgmac100_rxdes *rxdes)
+{
+ return rxdes->rxdes1 & cpu_to_le32(FTGMAC100_RXDES1_TCP_CHKSUM_ERR);
+}
+
+static bool ftgmac100_rxdes_udpcs_err(struct ftgmac100_rxdes *rxdes)
+{
+ return rxdes->rxdes1 & cpu_to_le32(FTGMAC100_RXDES1_UDP_CHKSUM_ERR);
+}
+
+static bool ftgmac100_rxdes_ipcs_err(struct ftgmac100_rxdes *rxdes)
+{
+ return rxdes->rxdes1 & cpu_to_le32(FTGMAC100_RXDES1_IP_CHKSUM_ERR);
+}
+
+/*
+ * rxdes2 is not used by hardware. We use it to keep track of page.
+ * Since hardware does not touch it, we can skip cpu_to_le32()/le32_to_cpu().
+ */
+static void ftgmac100_rxdes_set_page(struct ftgmac100_rxdes *rxdes, struct page *page)
+{
+ rxdes->rxdes2 = (unsigned int)page;
+}
+
+static struct page *ftgmac100_rxdes_get_page(struct ftgmac100_rxdes *rxdes)
+{
+ return (struct page *)rxdes->rxdes2;
+}
+
+/******************************************************************************
+ * internal functions (receive)
+ *****************************************************************************/
+static int ftgmac100_next_rx_pointer(int pointer)
+{
+ return (pointer + 1) & (RX_QUEUE_ENTRIES - 1);
+}
+
+static void ftgmac100_rx_pointer_advance(struct ftgmac100 *priv)
+{
+ priv->rx_pointer = ftgmac100_next_rx_pointer(priv->rx_pointer);
+}
+
+static struct ftgmac100_rxdes *ftgmac100_current_rxdes(struct ftgmac100 *priv)
+{
+ return &priv->descs->rxdes[priv->rx_pointer];
+}
+
+static struct ftgmac100_rxdes *
+ftgmac100_rx_locate_first_segment(struct ftgmac100 *priv)
+{
+ struct ftgmac100_rxdes *rxdes = ftgmac100_current_rxdes(priv);
+
+ while (ftgmac100_rxdes_packet_ready(rxdes)) {
+ if (ftgmac100_rxdes_first_segment(rxdes))
+ return rxdes;
+
+ ftgmac100_rxdes_set_dma_own(rxdes);
+ ftgmac100_rx_pointer_advance(priv);
+ rxdes = ftgmac100_current_rxdes(priv);
+ }
+
+ return NULL;
+}
+
+static bool ftgmac100_rx_packet_error(struct ftgmac100 *priv,
+ struct ftgmac100_rxdes *rxdes)
+{
+ struct net_device *netdev = priv->netdev;
+ bool error = false;
+
+ if (unlikely(ftgmac100_rxdes_rx_error(rxdes))) {
+ if (net_ratelimit())
+ netdev_info(netdev, "rx err\n");
+
+ netdev->stats.rx_errors++;
+ error = true;
+ }
+
+ if (unlikely(ftgmac100_rxdes_crc_error(rxdes))) {
+ if (net_ratelimit())
+ netdev_info(netdev, "rx crc err\n");
+
+ netdev->stats.rx_crc_errors++;
+ error = true;
+ } else if (unlikely(ftgmac100_rxdes_ipcs_err(rxdes))) {
+ if (net_ratelimit())
+ netdev_info(netdev, "rx IP checksum err\n");
+
+ error = true;
+ }
+
+ if (unlikely(ftgmac100_rxdes_frame_too_long(rxdes))) {
+ if (net_ratelimit())
+ netdev_info(netdev, "rx frame too long\n");
+
+ netdev->stats.rx_length_errors++;
+ error = true;
+ } else if (unlikely(ftgmac100_rxdes_runt(rxdes))) {
+ if (net_ratelimit())
+ netdev_info(netdev, "rx runt\n");
+
+ netdev->stats.rx_length_errors++;
+ error = true;
+ } else if (unlikely(ftgmac100_rxdes_odd_nibble(rxdes))) {
+ if (net_ratelimit())
+ netdev_info(netdev, "rx odd nibble\n");
+
+ netdev->stats.rx_length_errors++;
+ error = true;
+ }
+
+ return error;
+}
+
+static void ftgmac100_rx_drop_packet(struct ftgmac100 *priv)
+{
+ struct net_device *netdev = priv->netdev;
+ struct ftgmac100_rxdes *rxdes = ftgmac100_current_rxdes(priv);
+ bool done = false;
+
+ if (net_ratelimit())
+ netdev_dbg(netdev, "drop packet %p\n", rxdes);
+
+ do {
+ if (ftgmac100_rxdes_last_segment(rxdes))
+ done = true;
+
+ ftgmac100_rxdes_set_dma_own(rxdes);
+ ftgmac100_rx_pointer_advance(priv);
+ rxdes = ftgmac100_current_rxdes(priv);
+ } while (!done && ftgmac100_rxdes_packet_ready(rxdes));
+
+ netdev->stats.rx_dropped++;
+}
+
+static bool ftgmac100_rx_packet(struct ftgmac100 *priv, int *processed)
+{
+ struct net_device *netdev = priv->netdev;
+ struct ftgmac100_rxdes *rxdes;
+ struct sk_buff *skb;
+ bool done = false;
+
+ rxdes = ftgmac100_rx_locate_first_segment(priv);
+ if (!rxdes)
+ return false;
+
+ if (unlikely(ftgmac100_rx_packet_error(priv, rxdes))) {
+ ftgmac100_rx_drop_packet(priv);
+ return true;
+ }
+
+ /* start processing */
+ skb = netdev_alloc_skb_ip_align(netdev, 128);
+ if (unlikely(!skb)) {
+ if (net_ratelimit())
+ netdev_err(netdev, "rx skb alloc failed\n");
+
+ ftgmac100_rx_drop_packet(priv);
+ return true;
+ }
+
+ if (unlikely(ftgmac100_rxdes_multicast(rxdes)))
+ netdev->stats.multicast++;
+
+ /*
+ * It seems that HW does checksum incorrectly with fragmented packets,
+ * so we are conservative here - if HW checksum error, let software do
+ * the checksum again.
+ */
+ if ((ftgmac100_rxdes_is_tcp(rxdes) && !ftgmac100_rxdes_tcpcs_err(rxdes)) ||
+ (ftgmac100_rxdes_is_udp(rxdes) && !ftgmac100_rxdes_udpcs_err(rxdes)))
+ skb->ip_summed = CHECKSUM_UNNECESSARY;
+
+ do {
+ dma_addr_t map = ftgmac100_rxdes_get_dma_addr(rxdes);
+ struct page *page = ftgmac100_rxdes_get_page(rxdes);
+ unsigned int size;
+
+ dma_unmap_page(priv->dev, map, RX_BUF_SIZE, DMA_FROM_DEVICE);
+
+ size = ftgmac100_rxdes_data_length(rxdes);
+ skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags, page, 0, size);
+
+ skb->len += size;
+ skb->data_len += size;
+ skb->truesize += size;
+
+ if (ftgmac100_rxdes_last_segment(rxdes))
+ done = true;
+
+ ftgmac100_alloc_rx_page(priv, rxdes, GFP_ATOMIC);
+
+ ftgmac100_rx_pointer_advance(priv);
+ rxdes = ftgmac100_current_rxdes(priv);
+ } while (!done);
+
+ __pskb_pull_tail(skb, min(skb->len, 64U));
+ skb->protocol = eth_type_trans(skb, netdev);
+
+ netdev->stats.rx_packets++;
+ netdev->stats.rx_bytes += skb->len;
+
+ /* push packet to protocol stack */
+ netif_receive_skb(skb);
+
+ (*processed)++;
+ return true;
+}
+
+/******************************************************************************
+ * internal functions (transmit descriptor)
+ *****************************************************************************/
+static void ftgmac100_txdes_reset(struct ftgmac100_txdes *txdes)
+{
+ /* clear all except end of ring bit */
+ txdes->txdes0 &= cpu_to_le32(FTGMAC100_TXDES0_EDOTR);
+ txdes->txdes1 = 0;
+ txdes->txdes2 = 0;
+ txdes->txdes3 = 0;
+}
+
+static bool ftgmac100_txdes_owned_by_dma(struct ftgmac100_txdes *txdes)
+{
+ return txdes->txdes0 & cpu_to_le32(FTGMAC100_TXDES0_TXDMA_OWN);
+}
+
+static void ftgmac100_txdes_set_dma_own(struct ftgmac100_txdes *txdes)
+{
+ /*
+ * Make sure dma own bit will not be set before any other
+ * descriptor fields.
+ */
+ wmb();
+ txdes->txdes0 |= cpu_to_le32(FTGMAC100_TXDES0_TXDMA_OWN);
+}
+
+static void ftgmac100_txdes_set_end_of_ring(struct ftgmac100_txdes *txdes)
+{
+ txdes->txdes0 |= cpu_to_le32(FTGMAC100_TXDES0_EDOTR);
+}
+
+static void ftgmac100_txdes_set_first_segment(struct ftgmac100_txdes *txdes)
+{
+ txdes->txdes0 |= cpu_to_le32(FTGMAC100_TXDES0_FTS);
+}
+
+static void ftgmac100_txdes_set_last_segment(struct ftgmac100_txdes *txdes)
+{
+ txdes->txdes0 |= cpu_to_le32(FTGMAC100_TXDES0_LTS);
+}
+
+static void ftgmac100_txdes_set_buffer_size(struct ftgmac100_txdes *txdes,
+ unsigned int len)
+{
+ txdes->txdes0 |= cpu_to_le32(FTGMAC100_TXDES0_TXBUF_SIZE(len));
+}
+
+static void ftgmac100_txdes_set_txint(struct ftgmac100_txdes *txdes)
+{
+ txdes->txdes1 |= cpu_to_le32(FTGMAC100_TXDES1_TXIC);
+}
+
+static void ftgmac100_txdes_set_tcpcs(struct ftgmac100_txdes *txdes)
+{
+ txdes->txdes1 |= cpu_to_le32(FTGMAC100_TXDES1_TCP_CHKSUM);
+}
+
+static void ftgmac100_txdes_set_udpcs(struct ftgmac100_txdes *txdes)
+{
+ txdes->txdes1 |= cpu_to_le32(FTGMAC100_TXDES1_UDP_CHKSUM);
+}
+
+static void ftgmac100_txdes_set_ipcs(struct ftgmac100_txdes *txdes)
+{
+ txdes->txdes1 |= cpu_to_le32(FTGMAC100_TXDES1_IP_CHKSUM);
+}
+
+static void ftgmac100_txdes_set_dma_addr(struct ftgmac100_txdes *txdes,
+ dma_addr_t addr)
+{
+ txdes->txdes3 = cpu_to_le32(addr);
+}
+
+static dma_addr_t ftgmac100_txdes_get_dma_addr(struct ftgmac100_txdes *txdes)
+{
+ return le32_to_cpu(txdes->txdes3);
+}
+
+/*
+ * txdes2 is not used by hardware. We use it to keep track of socket buffer.
+ * Since hardware does not touch it, we can skip cpu_to_le32()/le32_to_cpu().
+ */
+static void ftgmac100_txdes_set_skb(struct ftgmac100_txdes *txdes,
+ struct sk_buff *skb)
+{
+ txdes->txdes2 = (unsigned int)skb;
+}
+
+static struct sk_buff *ftgmac100_txdes_get_skb(struct ftgmac100_txdes *txdes)
+{
+ return (struct sk_buff *)txdes->txdes2;
+}
+
+/******************************************************************************
+ * internal functions (transmit)
+ *****************************************************************************/
+static int ftgmac100_next_tx_pointer(int pointer)
+{
+ return (pointer + 1) & (TX_QUEUE_ENTRIES - 1);
+}
+
+static void ftgmac100_tx_pointer_advance(struct ftgmac100 *priv)
+{
+ priv->tx_pointer = ftgmac100_next_tx_pointer(priv->tx_pointer);
+}
+
+static void ftgmac100_tx_clean_pointer_advance(struct ftgmac100 *priv)
+{
+ priv->tx_clean_pointer = ftgmac100_next_tx_pointer(priv->tx_clean_pointer);
+}
+
+static struct ftgmac100_txdes *ftgmac100_current_txdes(struct ftgmac100 *priv)
+{
+ return &priv->descs->txdes[priv->tx_pointer];
+}
+
+static struct ftgmac100_txdes *
+ftgmac100_current_clean_txdes(struct ftgmac100 *priv)
+{
+ return &priv->descs->txdes[priv->tx_clean_pointer];
+}
+
+static bool ftgmac100_tx_complete_packet(struct ftgmac100 *priv)
+{
+ struct net_device *netdev = priv->netdev;
+ struct ftgmac100_txdes *txdes;
+ struct sk_buff *skb;
+ dma_addr_t map;
+
+ if (priv->tx_pending == 0)
+ return false;
+
+ txdes = ftgmac100_current_clean_txdes(priv);
+
+ if (ftgmac100_txdes_owned_by_dma(txdes))
+ return false;
+
+ skb = ftgmac100_txdes_get_skb(txdes);
+ map = ftgmac100_txdes_get_dma_addr(txdes);
+
+ netdev->stats.tx_packets++;
+ netdev->stats.tx_bytes += skb->len;
+
+ dma_unmap_single(priv->dev, map, skb_headlen(skb), DMA_TO_DEVICE);
+
+ dev_kfree_skb(skb);
+
+ ftgmac100_txdes_reset(txdes);
+
+ ftgmac100_tx_clean_pointer_advance(priv);
+
+ spin_lock(&priv->tx_lock);
+ priv->tx_pending--;
+ spin_unlock(&priv->tx_lock);
+ netif_wake_queue(netdev);
+
+ return true;
+}
+
+static void ftgmac100_tx_complete(struct ftgmac100 *priv)
+{
+ while (ftgmac100_tx_complete_packet(priv))
+ ;
+}
+
+static int ftgmac100_xmit(struct ftgmac100 *priv, struct sk_buff *skb,
+ dma_addr_t map)
+{
+ struct net_device *netdev = priv->netdev;
+ struct ftgmac100_txdes *txdes;
+ unsigned int len = (skb->len < ETH_ZLEN) ? ETH_ZLEN : skb->len;
+
+ txdes = ftgmac100_current_txdes(priv);
+ ftgmac100_tx_pointer_advance(priv);
+
+ /* setup TX descriptor */
+ ftgmac100_txdes_set_skb(txdes, skb);
+ ftgmac100_txdes_set_dma_addr(txdes, map);
+ ftgmac100_txdes_set_buffer_size(txdes, len);
+
+ ftgmac100_txdes_set_first_segment(txdes);
+ ftgmac100_txdes_set_last_segment(txdes);
+ ftgmac100_txdes_set_txint(txdes);
+ if (skb->ip_summed == CHECKSUM_PARTIAL) {
+ __be16 protocol = skb->protocol;
+
+ if (protocol == cpu_to_be16(ETH_P_IP)) {
+ u8 ip_proto = ip_hdr(skb)->protocol;
+
+ ftgmac100_txdes_set_ipcs(txdes);
+ if (ip_proto == IPPROTO_TCP)
+ ftgmac100_txdes_set_tcpcs(txdes);
+ else if (ip_proto == IPPROTO_UDP)
+ ftgmac100_txdes_set_udpcs(txdes);
+ }
+ }
+
+ spin_lock(&priv->tx_lock);
+ priv->tx_pending++;
+ if (priv->tx_pending == TX_QUEUE_ENTRIES)
+ netif_stop_queue(netdev);
+
+ /* start transmit */
+ ftgmac100_txdes_set_dma_own(txdes);
+ spin_unlock(&priv->tx_lock);
+
+ ftgmac100_txdma_normal_prio_start_polling(priv);
+
+ return NETDEV_TX_OK;
+}
+
+/******************************************************************************
+ * internal functions (buffer)
+ *****************************************************************************/
+static int ftgmac100_alloc_rx_page(struct ftgmac100 *priv,
+ struct ftgmac100_rxdes *rxdes, gfp_t gfp)
+{
+ struct net_device *netdev = priv->netdev;
+ struct page *page;
+ dma_addr_t map;
+
+ page = alloc_page(gfp);
+ if (!page) {
+ if (net_ratelimit())
+ netdev_err(netdev, "failed to allocate rx page\n");
+ return -ENOMEM;
+ }
+
+ map = dma_map_page(priv->dev, page, 0, RX_BUF_SIZE, DMA_FROM_DEVICE);
+ if (unlikely(dma_mapping_error(priv->dev, map))) {
+ if (net_ratelimit())
+ netdev_err(netdev, "failed to map rx page\n");
+ __free_page(page);
+ return -ENOMEM;
+ }
+
+ ftgmac100_rxdes_set_page(rxdes, page);
+ ftgmac100_rxdes_set_dma_addr(rxdes, map);
+ ftgmac100_rxdes_set_dma_own(rxdes);
+ return 0;
+}
+
+static void ftgmac100_free_buffers(struct ftgmac100 *priv)
+{
+ int i;
+
+ for (i = 0; i < RX_QUEUE_ENTRIES; i++) {
+ struct ftgmac100_rxdes *rxdes = &priv->descs->rxdes[i];
+ struct page *page = ftgmac100_rxdes_get_page(rxdes);
+ dma_addr_t map = ftgmac100_rxdes_get_dma_addr(rxdes);
+
+ if (!page)
+ continue;
+
+ dma_unmap_page(priv->dev, map, RX_BUF_SIZE, DMA_FROM_DEVICE);
+ __free_page(page);
+ }
+
+ for (i = 0; i < TX_QUEUE_ENTRIES; i++) {
+ struct ftgmac100_txdes *txdes = &priv->descs->txdes[i];
+ struct sk_buff *skb = ftgmac100_txdes_get_skb(txdes);
+ dma_addr_t map = ftgmac100_txdes_get_dma_addr(txdes);
+
+ if (!skb)
+ continue;
+
+ dma_unmap_single(priv->dev, map, skb_headlen(skb), DMA_TO_DEVICE);
+ dev_kfree_skb(skb);
+ }
+
+ dma_free_coherent(priv->dev, sizeof(struct ftgmac100_descs),
+ priv->descs, priv->descs_dma_addr);
+}
+
+static int ftgmac100_alloc_buffers(struct ftgmac100 *priv)
+{
+ int i;
+
+ priv->descs = dma_alloc_coherent(priv->dev,
+ sizeof(struct ftgmac100_descs),
+ &priv->descs_dma_addr, GFP_KERNEL);
+ if (!priv->descs)
+ return -ENOMEM;
+
+ memset(priv->descs, 0, sizeof(struct ftgmac100_descs));
+
+ /* initialize RX ring */
+ ftgmac100_rxdes_set_end_of_ring(&priv->descs->rxdes[RX_QUEUE_ENTRIES - 1]);
+
+ for (i = 0; i < RX_QUEUE_ENTRIES; i++) {
+ struct ftgmac100_rxdes *rxdes = &priv->descs->rxdes[i];
+
+ if (ftgmac100_alloc_rx_page(priv, rxdes, GFP_KERNEL))
+ goto err;
+ }
+
+ /* initialize TX ring */
+ ftgmac100_txdes_set_end_of_ring(&priv->descs->txdes[TX_QUEUE_ENTRIES - 1]);
+ return 0;
+
+err:
+ ftgmac100_free_buffers(priv);
+ return -ENOMEM;
+}
+
+/******************************************************************************
+ * internal functions (mdio)
+ *****************************************************************************/
+static void ftgmac100_adjust_link(struct net_device *netdev)
+{
+ struct ftgmac100 *priv = netdev_priv(netdev);
+ struct phy_device *phydev = priv->phydev;
+ int ier;
+
+ if (phydev->speed == priv->old_speed)
+ return;
+
+ priv->old_speed = phydev->speed;
+
+ ier = ioread32(priv->base + FTGMAC100_OFFSET_IER);
+
+ /* disable all interrupts */
+ iowrite32(0, priv->base + FTGMAC100_OFFSET_IER);
+
+ netif_stop_queue(netdev);
+ ftgmac100_stop_hw(priv);
+
+ netif_start_queue(netdev);
+ ftgmac100_init_hw(priv);
+ ftgmac100_start_hw(priv, phydev->speed);
+
+ /* re-enable interrupts */
+ iowrite32(ier, priv->base + FTGMAC100_OFFSET_IER);
+}
+
+static int ftgmac100_mii_probe(struct ftgmac100 *priv)
+{
+ struct net_device *netdev = priv->netdev;
+ struct phy_device *phydev = NULL;
+ int i;
+
+ /* search for connect PHY device */
+ for (i = 0; i < PHY_MAX_ADDR; i++) {
+ struct phy_device *tmp = priv->mii_bus->phy_map[i];
+
+ if (tmp) {
+ phydev = tmp;
+ break;
+ }
+ }
+
+ /* now we are supposed to have a proper phydev, to attach to... */
+ if (!phydev) {
+ netdev_info(netdev, "%s: no PHY found\n", netdev->name);
+ return -ENODEV;
+ }
+
+ phydev = phy_connect(netdev, dev_name(&phydev->dev),
+ &ftgmac100_adjust_link, 0,
+ PHY_INTERFACE_MODE_GMII);
+
+ if (IS_ERR(phydev)) {
+ netdev_err(netdev, "%s: Could not attach to PHY\n", netdev->name);
+ return PTR_ERR(phydev);
+ }
+
+ priv->phydev = phydev;
+ return 0;
+}
+
+/******************************************************************************
+ * struct mii_bus functions
+ *****************************************************************************/
+static int ftgmac100_mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum)
+{
+ struct net_device *netdev = bus->priv;
+ struct ftgmac100 *priv = netdev_priv(netdev);
+ unsigned int phycr;
+ int i;
+
+ phycr = ioread32(priv->base + FTGMAC100_OFFSET_PHYCR);
+
+ /* preserve MDC cycle threshold */
+ phycr &= FTGMAC100_PHYCR_MDC_CYCTHR_MASK;
+
+ phycr |= FTGMAC100_PHYCR_PHYAD(phy_addr) |
+ FTGMAC100_PHYCR_REGAD(regnum) |
+ FTGMAC100_PHYCR_MIIRD;
+
+ iowrite32(phycr, priv->base + FTGMAC100_OFFSET_PHYCR);
+
+ for (i = 0; i < 10; i++) {
+ phycr = ioread32(priv->base + FTGMAC100_OFFSET_PHYCR);
+
+ if ((phycr & FTGMAC100_PHYCR_MIIRD) == 0) {
+ int data;
+
+ data = ioread32(priv->base + FTGMAC100_OFFSET_PHYDATA);
+ return FTGMAC100_PHYDATA_MIIRDATA(data);
+ }
+
+ usleep_range(100, 1000);
+ }
+
+ netdev_err(netdev, "mdio read timed out\n");
+ return -EIO;
+}
+
+static int ftgmac100_mdiobus_write(struct mii_bus *bus, int phy_addr,
+ int regnum, u16 value)
+{
+ struct net_device *netdev = bus->priv;
+ struct ftgmac100 *priv = netdev_priv(netdev);
+ unsigned int phycr;
+ int data;
+ int i;
+
+ phycr = ioread32(priv->base + FTGMAC100_OFFSET_PHYCR);
+
+ /* preserve MDC cycle threshold */
+ phycr &= FTGMAC100_PHYCR_MDC_CYCTHR_MASK;
+
+ phycr |= FTGMAC100_PHYCR_PHYAD(phy_addr) |
+ FTGMAC100_PHYCR_REGAD(regnum) |
+ FTGMAC100_PHYCR_MIIWR;
+
+ data = FTGMAC100_PHYDATA_MIIWDATA(value);
+
+ iowrite32(data, priv->base + FTGMAC100_OFFSET_PHYDATA);
+ iowrite32(phycr, priv->base + FTGMAC100_OFFSET_PHYCR);
+
+ for (i = 0; i < 10; i++) {
+ phycr = ioread32(priv->base + FTGMAC100_OFFSET_PHYCR);
+
+ if ((phycr & FTGMAC100_PHYCR_MIIWR) == 0)
+ return 0;
+
+ usleep_range(100, 1000);
+ }
+
+ netdev_err(netdev, "mdio write timed out\n");
+ return -EIO;
+}
+
+static int ftgmac100_mdiobus_reset(struct mii_bus *bus)
+{
+ return 0;
+}
+
+/******************************************************************************
+ * struct ethtool_ops functions
+ *****************************************************************************/
+static void ftgmac100_get_drvinfo(struct net_device *netdev,
+ struct ethtool_drvinfo *info)
+{
+ strcpy(info->driver, DRV_NAME);
+ strcpy(info->version, DRV_VERSION);
+ strcpy(info->bus_info, dev_name(&netdev->dev));
+}
+
+static int ftgmac100_get_settings(struct net_device *netdev,
+ struct ethtool_cmd *cmd)
+{
+ struct ftgmac100 *priv = netdev_priv(netdev);
+
+ return phy_ethtool_gset(priv->phydev, cmd);
+}
+
+static int ftgmac100_set_settings(struct net_device *netdev,
+ struct ethtool_cmd *cmd)
+{
+ struct ftgmac100 *priv = netdev_priv(netdev);
+
+ return phy_ethtool_sset(priv->phydev, cmd);
+}
+
+static const struct ethtool_ops ftgmac100_ethtool_ops = {
+ .set_settings = ftgmac100_set_settings,
+ .get_settings = ftgmac100_get_settings,
+ .get_drvinfo = ftgmac100_get_drvinfo,
+ .get_link = ethtool_op_get_link,
+};
+
+/******************************************************************************
+ * interrupt handler
+ *****************************************************************************/
+static irqreturn_t ftgmac100_interrupt(int irq, void *dev_id)
+{
+ struct net_device *netdev = dev_id;
+ struct ftgmac100 *priv = netdev_priv(netdev);
+
+ if (likely(netif_running(netdev))) {
+ /* Disable interrupts for polling */
+ iowrite32(0, priv->base + FTGMAC100_OFFSET_IER);
+ napi_schedule(&priv->napi);
+ }
+
+ return IRQ_HANDLED;
+}
+
+/******************************************************************************
+ * struct napi_struct functions
+ *****************************************************************************/
+static int ftgmac100_poll(struct napi_struct *napi, int budget)
+{
+ struct ftgmac100 *priv = container_of(napi, struct ftgmac100, napi);
+ struct net_device *netdev = priv->netdev;
+ unsigned int status;
+ bool completed = true;
+ int rx = 0;
+
+ status = ioread32(priv->base + FTGMAC100_OFFSET_ISR);
+ iowrite32(status, priv->base + FTGMAC100_OFFSET_ISR);
+
+ if (status & (FTGMAC100_INT_RPKT_BUF | FTGMAC100_INT_NO_RXBUF)) {
+ /*
+ * FTGMAC100_INT_RPKT_BUF:
+ * RX DMA has received packets into RX buffer successfully
+ *
+ * FTGMAC100_INT_NO_RXBUF:
+ * RX buffer unavailable
+ */
+ bool retry;
+
+ do {
+ retry = ftgmac100_rx_packet(priv, &rx);
+ } while (retry && rx < budget);
+
+ if (retry && rx == budget)
+ completed = false;
+ }
+
+ if (status & (FTGMAC100_INT_XPKT_ETH | FTGMAC100_INT_XPKT_LOST)) {
+ /*
+ * FTGMAC100_INT_XPKT_ETH:
+ * packet transmitted to ethernet successfully
+ *
+ * FTGMAC100_INT_XPKT_LOST:
+ * packet transmitted to ethernet lost due to late
+ * collision or excessive collision
+ */
+ ftgmac100_tx_complete(priv);
+ }
+
+ if (status & (FTGMAC100_INT_NO_RXBUF | FTGMAC100_INT_RPKT_LOST |
+ FTGMAC100_INT_AHB_ERR | FTGMAC100_INT_PHYSTS_CHG)) {
+ if (net_ratelimit())
+ netdev_info(netdev, "[ISR] = 0x%x: %s%s%s%s\n", status,
+ status & FTGMAC100_INT_NO_RXBUF ? "NO_RXBUF " : "",
+ status & FTGMAC100_INT_RPKT_LOST ? "RPKT_LOST " : "",
+ status & FTGMAC100_INT_AHB_ERR ? "AHB_ERR " : "",
+ status & FTGMAC100_INT_PHYSTS_CHG ? "PHYSTS_CHG" : "");
+
+ if (status & FTGMAC100_INT_NO_RXBUF) {
+ /* RX buffer unavailable */
+ netdev->stats.rx_over_errors++;
+ }
+
+ if (status & FTGMAC100_INT_RPKT_LOST) {
+ /* received packet lost due to RX FIFO full */
+ netdev->stats.rx_fifo_errors++;
+ }
+ }
+
+ if (completed) {
+ napi_complete(napi);
+
+ /* enable all interrupts */
+ iowrite32(INT_MASK_ALL_ENABLED, priv->base + FTGMAC100_OFFSET_IER);
+ }
+
+ return rx;
+}
+
+/******************************************************************************
+ * struct net_device_ops functions
+ *****************************************************************************/
+static int ftgmac100_open(struct net_device *netdev)
+{
+ struct ftgmac100 *priv = netdev_priv(netdev);
+ int err;
+
+ err = ftgmac100_alloc_buffers(priv);
+ if (err) {
+ netdev_err(netdev, "failed to allocate buffers\n");
+ goto err_alloc;
+ }
+
+ err = request_irq(priv->irq, ftgmac100_interrupt, 0, netdev->name, netdev);
+ if (err) {
+ netdev_err(netdev, "failed to request irq %d\n", priv->irq);
+ goto err_irq;
+ }
+
+ priv->rx_pointer = 0;
+ priv->tx_clean_pointer = 0;
+ priv->tx_pointer = 0;
+ priv->tx_pending = 0;
+
+ err = ftgmac100_reset_hw(priv);
+ if (err)
+ goto err_hw;
+
+ ftgmac100_init_hw(priv);
+ ftgmac100_start_hw(priv, 10);
+
+ phy_start(priv->phydev);
+
+ napi_enable(&priv->napi);
+ netif_start_queue(netdev);
+
+ /* enable all interrupts */
+ iowrite32(INT_MASK_ALL_ENABLED, priv->base + FTGMAC100_OFFSET_IER);
+ return 0;
+
+err_hw:
+ free_irq(priv->irq, netdev);
+err_irq:
+ ftgmac100_free_buffers(priv);
+err_alloc:
+ return err;
+}
+
+static int ftgmac100_stop(struct net_device *netdev)
+{
+ struct ftgmac100 *priv = netdev_priv(netdev);
+
+ /* disable all interrupts */
+ iowrite32(0, priv->base + FTGMAC100_OFFSET_IER);
+
+ netif_stop_queue(netdev);
+ napi_disable(&priv->napi);
+ phy_stop(priv->phydev);
+
+ ftgmac100_stop_hw(priv);
+ free_irq(priv->irq, netdev);
+ ftgmac100_free_buffers(priv);
+
+ return 0;
+}
+
+static int ftgmac100_hard_start_xmit(struct sk_buff *skb,
+ struct net_device *netdev)
+{
+ struct ftgmac100 *priv = netdev_priv(netdev);
+ dma_addr_t map;
+
+ if (unlikely(skb->len > MAX_PKT_SIZE)) {
+ if (net_ratelimit())
+ netdev_dbg(netdev, "tx packet too big\n");
+
+ netdev->stats.tx_dropped++;
+ dev_kfree_skb(skb);
+ return NETDEV_TX_OK;
+ }
+
+ map = dma_map_single(priv->dev, skb->data, skb_headlen(skb), DMA_TO_DEVICE);
+ if (unlikely(dma_mapping_error(priv->dev, map))) {
+ /* drop packet */
+ if (net_ratelimit())
+ netdev_err(netdev, "map socket buffer failed\n");
+
+ netdev->stats.tx_dropped++;
+ dev_kfree_skb(skb);
+ return NETDEV_TX_OK;
+ }
+
+ return ftgmac100_xmit(priv, skb, map);
+}
+
+/* optional */
+static int ftgmac100_do_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
+{
+ struct ftgmac100 *priv = netdev_priv(netdev);
+
+ return phy_mii_ioctl(priv->phydev, ifr, cmd);
+}
+
+static const struct net_device_ops ftgmac100_netdev_ops = {
+ .ndo_open = ftgmac100_open,
+ .ndo_stop = ftgmac100_stop,
+ .ndo_start_xmit = ftgmac100_hard_start_xmit,
+ .ndo_set_mac_address = eth_mac_addr,
+ .ndo_validate_addr = eth_validate_addr,
+ .ndo_do_ioctl = ftgmac100_do_ioctl,
+};
+
+/******************************************************************************
+ * struct platform_driver functions
+ *****************************************************************************/
+static int ftgmac100_probe(struct platform_device *pdev)
+{
+ struct resource *res;
+ int irq;
+ struct net_device *netdev;
+ struct ftgmac100 *priv;
+ int err;
+ int i;
+
+ if (!pdev)
+ return -ENODEV;
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res)
+ return -ENXIO;
+
+ irq = platform_get_irq(pdev, 0);
+ if (irq < 0)
+ return irq;
+
+ /* setup net_device */
+ netdev = alloc_etherdev(sizeof(*priv));
+ if (!netdev) {
+ err = -ENOMEM;
+ goto err_alloc_etherdev;
+ }
+
+ SET_NETDEV_DEV(netdev, &pdev->dev);
+
+ SET_ETHTOOL_OPS(netdev, &ftgmac100_ethtool_ops);
+ netdev->netdev_ops = &ftgmac100_netdev_ops;
+ netdev->features = NETIF_F_IP_CSUM;
+
+ platform_set_drvdata(pdev, netdev);
+
+ /* setup private data */
+ priv = netdev_priv(netdev);
+ priv->netdev = netdev;
+ priv->dev = &pdev->dev;
+
+ spin_lock_init(&priv->tx_lock);
+
+ /* initialize NAPI */
+ netif_napi_add(netdev, &priv->napi, ftgmac100_poll, 64);
+
+ /* map io memory */
+ priv->res = request_mem_region(res->start, resource_size(res),
+ dev_name(&pdev->dev));
+ if (!priv->res) {
+ dev_err(&pdev->dev, "Could not reserve memory region\n");
+ err = -ENOMEM;
+ goto err_req_mem;
+ }
+
+ priv->base = ioremap(res->start, res->end - res->start);
+ if (!priv->base) {
+ dev_err(&pdev->dev, "Failed to ioremap ethernet registers\n");
+ err = -EIO;
+ goto err_ioremap;
+ }
+
+ priv->irq = irq;
+
+ /* initialize mdio bus */
+ priv->mii_bus = mdiobus_alloc();
+ if (!priv->mii_bus) {
+ err = -EIO;
+ goto err_alloc_mdiobus;
+ }
+
+ priv->mii_bus->name = "ftgmac100_mdio";
+ snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "ftgmac100_mii");
+
+ priv->mii_bus->priv = netdev;
+ priv->mii_bus->read = ftgmac100_mdiobus_read;
+ priv->mii_bus->write = ftgmac100_mdiobus_write;
+ priv->mii_bus->reset = ftgmac100_mdiobus_reset;
+ priv->mii_bus->irq = priv->phy_irq;
+
+ for (i = 0; i < PHY_MAX_ADDR; i++)
+ priv->mii_bus->irq[i] = PHY_POLL;
+
+ err = mdiobus_register(priv->mii_bus);
+ if (err) {
+ dev_err(&pdev->dev, "Cannot register MDIO bus!\n");
+ goto err_register_mdiobus;
+ }
+
+ err = ftgmac100_mii_probe(priv);
+ if (err) {
+ dev_err(&pdev->dev, "MII Probe failed!\n");
+ goto err_mii_probe;
+ }
+
+ /* register network device */
+ err = register_netdev(netdev);
+ if (err) {
+ dev_err(&pdev->dev, "Failed to register netdev\n");
+ goto err_register_netdev;
+ }
+
+ netdev_info(netdev, "irq %d, mapped at %p\n", priv->irq, priv->base);
+
+ if (!is_valid_ether_addr(netdev->dev_addr)) {
+ random_ether_addr(netdev->dev_addr);
+ netdev_info(netdev, "generated random MAC address %pM\n",
+ netdev->dev_addr);
+ }
+
+ return 0;
+
+err_register_netdev:
+ phy_disconnect(priv->phydev);
+err_mii_probe:
+ mdiobus_unregister(priv->mii_bus);
+err_register_mdiobus:
+ mdiobus_free(priv->mii_bus);
+err_alloc_mdiobus:
+ iounmap(priv->base);
+err_ioremap:
+ release_resource(priv->res);
+err_req_mem:
+ netif_napi_del(&priv->napi);
+ platform_set_drvdata(pdev, NULL);
+ free_netdev(netdev);
+err_alloc_etherdev:
+ return err;
+}
+
+static int __exit ftgmac100_remove(struct platform_device *pdev)
+{
+ struct net_device *netdev;
+ struct ftgmac100 *priv;
+
+ netdev = platform_get_drvdata(pdev);
+ priv = netdev_priv(netdev);
+
+ unregister_netdev(netdev);
+
+ phy_disconnect(priv->phydev);
+ mdiobus_unregister(priv->mii_bus);
+ mdiobus_free(priv->mii_bus);
+
+ iounmap(priv->base);
+ release_resource(priv->res);
+
+ netif_napi_del(&priv->napi);
+ platform_set_drvdata(pdev, NULL);
+ free_netdev(netdev);
+ return 0;
+}
+
+static struct platform_driver ftgmac100_driver = {
+ .probe = ftgmac100_probe,
+ .remove = __exit_p(ftgmac100_remove),
+ .driver = {
+ .name = DRV_NAME,
+ .owner = THIS_MODULE,
+ },
+};
+
+/******************************************************************************
+ * initialization / finalization
+ *****************************************************************************/
+static int __init ftgmac100_init(void)
+{
+ pr_info("Loading version " DRV_VERSION " ...\n");
+ return platform_driver_register(&ftgmac100_driver);
+}
+
+static void __exit ftgmac100_exit(void)
+{
+ platform_driver_unregister(&ftgmac100_driver);
+}
+
+module_init(ftgmac100_init);
+module_exit(ftgmac100_exit);
+
+MODULE_AUTHOR("Po-Yu Chuang <ratbert@faraday-tech.com>");
+MODULE_DESCRIPTION("FTGMAC100 driver");
+MODULE_LICENSE("GPL");
diff --git a/drivers/net/ftgmac100.h b/drivers/net/ftgmac100.h
new file mode 100644
index 0000000..13408d4
--- /dev/null
+++ b/drivers/net/ftgmac100.h
@@ -0,0 +1,246 @@
+/*
+ * Faraday FTGMAC100 Gigabit Ethernet
+ *
+ * (C) Copyright 2009-2011 Faraday Technology
+ * Po-Yu Chuang <ratbert@faraday-tech.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __FTGMAC100_H
+#define __FTGMAC100_H
+
+#define FTGMAC100_OFFSET_ISR 0x00
+#define FTGMAC100_OFFSET_IER 0x04
+#define FTGMAC100_OFFSET_MAC_MADR 0x08
+#define FTGMAC100_OFFSET_MAC_LADR 0x0c
+#define FTGMAC100_OFFSET_MAHT0 0x10
+#define FTGMAC100_OFFSET_MAHT1 0x14
+#define FTGMAC100_OFFSET_NPTXPD 0x18
+#define FTGMAC100_OFFSET_RXPD 0x1c
+#define FTGMAC100_OFFSET_NPTXR_BADR 0x20
+#define FTGMAC100_OFFSET_RXR_BADR 0x24
+#define FTGMAC100_OFFSET_HPTXPD 0x28
+#define FTGMAC100_OFFSET_HPTXR_BADR 0x2c
+#define FTGMAC100_OFFSET_ITC 0x30
+#define FTGMAC100_OFFSET_APTC 0x34
+#define FTGMAC100_OFFSET_DBLAC 0x38
+#define FTGMAC100_OFFSET_DMAFIFOS 0x3c
+#define FTGMAC100_OFFSET_REVR 0x40
+#define FTGMAC100_OFFSET_FEAR 0x44
+#define FTGMAC100_OFFSET_TPAFCR 0x48
+#define FTGMAC100_OFFSET_RBSR 0x4c
+#define FTGMAC100_OFFSET_MACCR 0x50
+#define FTGMAC100_OFFSET_MACSR 0x54
+#define FTGMAC100_OFFSET_TM 0x58
+#define FTGMAC100_OFFSET_PHYCR 0x60
+#define FTGMAC100_OFFSET_PHYDATA 0x64
+#define FTGMAC100_OFFSET_FCR 0x68
+#define FTGMAC100_OFFSET_BPR 0x6c
+#define FTGMAC100_OFFSET_WOLCR 0x70
+#define FTGMAC100_OFFSET_WOLSR 0x74
+#define FTGMAC100_OFFSET_WFCRC 0x78
+#define FTGMAC100_OFFSET_WFBM1 0x80
+#define FTGMAC100_OFFSET_WFBM2 0x84
+#define FTGMAC100_OFFSET_WFBM3 0x88
+#define FTGMAC100_OFFSET_WFBM4 0x8c
+#define FTGMAC100_OFFSET_NPTXR_PTR 0x90
+#define FTGMAC100_OFFSET_HPTXR_PTR 0x94
+#define FTGMAC100_OFFSET_RXR_PTR 0x98
+#define FTGMAC100_OFFSET_TX 0xa0
+#define FTGMAC100_OFFSET_TX_MCOL_SCOL 0xa4
+#define FTGMAC100_OFFSET_TX_ECOL_FAIL 0xa8
+#define FTGMAC100_OFFSET_TX_LCOL_UND 0xac
+#define FTGMAC100_OFFSET_RX 0xb0
+#define FTGMAC100_OFFSET_RX_BC 0xb4
+#define FTGMAC100_OFFSET_RX_MC 0xb8
+#define FTGMAC100_OFFSET_RX_PF_AEP 0xbc
+#define FTGMAC100_OFFSET_RX_RUNT 0xc0
+#define FTGMAC100_OFFSET_RX_CRCER_FTL 0xc4
+#define FTGMAC100_OFFSET_RX_COL_LOST 0xc8
+
+/*
+ * Interrupt status register & interrupt enable register
+ */
+#define FTGMAC100_INT_RPKT_BUF (1 << 0)
+#define FTGMAC100_INT_RPKT_FIFO (1 << 1)
+#define FTGMAC100_INT_NO_RXBUF (1 << 2)
+#define FTGMAC100_INT_RPKT_LOST (1 << 3)
+#define FTGMAC100_INT_XPKT_ETH (1 << 4)
+#define FTGMAC100_INT_XPKT_FIFO (1 << 5)
+#define FTGMAC100_INT_NO_NPTXBUF (1 << 6)
+#define FTGMAC100_INT_XPKT_LOST (1 << 7)
+#define FTGMAC100_INT_AHB_ERR (1 << 8)
+#define FTGMAC100_INT_PHYSTS_CHG (1 << 9)
+#define FTGMAC100_INT_NO_HPTXBUF (1 << 10)
+
+/*
+ * Interrupt timer control register
+ */
+#define FTGMAC100_ITC_RXINT_CNT(x) (((x) & 0xf) << 0)
+#define FTGMAC100_ITC_RXINT_THR(x) (((x) & 0x7) << 4)
+#define FTGMAC100_ITC_RXINT_TIME_SEL (1 << 7)
+#define FTGMAC100_ITC_TXINT_CNT(x) (((x) & 0xf) << 8)
+#define FTGMAC100_ITC_TXINT_THR(x) (((x) & 0x7) << 12)
+#define FTGMAC100_ITC_TXINT_TIME_SEL (1 << 15)
+
+/*
+ * Automatic polling timer control register
+ */
+#define FTGMAC100_APTC_RXPOLL_CNT(x) (((x) & 0xf) << 0)
+#define FTGMAC100_APTC_RXPOLL_TIME_SEL (1 << 4)
+#define FTGMAC100_APTC_TXPOLL_CNT(x) (((x) & 0xf) << 8)
+#define FTGMAC100_APTC_TXPOLL_TIME_SEL (1 << 12)
+
+/*
+ * DMA burst length and arbitration control register
+ */
+#define FTGMAC100_DBLAC_RXFIFO_LTHR(x) (((x) & 0x7) << 0)
+#define FTGMAC100_DBLAC_RXFIFO_HTHR(x) (((x) & 0x7) << 3)
+#define FTGMAC100_DBLAC_RX_THR_EN (1 << 6)
+#define FTGMAC100_DBLAC_RXBURST_SIZE(x) (((x) & 0x3) << 8)
+#define FTGMAC100_DBLAC_TXBURST_SIZE(x) (((x) & 0x3) << 10)
+#define FTGMAC100_DBLAC_RXDES_SIZE(x) (((x) & 0xf) << 12)
+#define FTGMAC100_DBLAC_TXDES_SIZE(x) (((x) & 0xf) << 16)
+#define FTGMAC100_DBLAC_IFG_CNT(x) (((x) & 0x7) << 20)
+#define FTGMAC100_DBLAC_IFG_INC (1 << 23)
+
+/*
+ * DMA FIFO status register
+ */
+#define FTGMAC100_DMAFIFOS_RXDMA1_SM(dmafifos) ((dmafifos) & 0xf)
+#define FTGMAC100_DMAFIFOS_RXDMA2_SM(dmafifos) (((dmafifos) >> 4) & 0xf)
+#define FTGMAC100_DMAFIFOS_RXDMA3_SM(dmafifos) (((dmafifos) >> 8) & 0x7)
+#define FTGMAC100_DMAFIFOS_TXDMA1_SM(dmafifos) (((dmafifos) >> 12) & 0xf)
+#define FTGMAC100_DMAFIFOS_TXDMA2_SM(dmafifos) (((dmafifos) >> 16) & 0x3)
+#define FTGMAC100_DMAFIFOS_TXDMA3_SM(dmafifos) (((dmafifos) >> 18) & 0xf)
+#define FTGMAC100_DMAFIFOS_RXFIFO_EMPTY (1 << 26)
+#define FTGMAC100_DMAFIFOS_TXFIFO_EMPTY (1 << 27)
+#define FTGMAC100_DMAFIFOS_RXDMA_GRANT (1 << 28)
+#define FTGMAC100_DMAFIFOS_TXDMA_GRANT (1 << 29)
+#define FTGMAC100_DMAFIFOS_RXDMA_REQ (1 << 30)
+#define FTGMAC100_DMAFIFOS_TXDMA_REQ (1 << 31)
+
+/*
+ * Receive buffer size register
+ */
+#define FTGMAC100_RBSR_SIZE(x) ((x) & 0x3fff)
+
+/*
+ * MAC control register
+ */
+#define FTGMAC100_MACCR_TXDMA_EN (1 << 0)
+#define FTGMAC100_MACCR_RXDMA_EN (1 << 1)
+#define FTGMAC100_MACCR_TXMAC_EN (1 << 2)
+#define FTGMAC100_MACCR_RXMAC_EN (1 << 3)
+#define FTGMAC100_MACCR_RM_VLAN (1 << 4)
+#define FTGMAC100_MACCR_HPTXR_EN (1 << 5)
+#define FTGMAC100_MACCR_LOOP_EN (1 << 6)
+#define FTGMAC100_MACCR_ENRX_IN_HALFTX (1 << 7)
+#define FTGMAC100_MACCR_FULLDUP (1 << 8)
+#define FTGMAC100_MACCR_GIGA_MODE (1 << 9)
+#define FTGMAC100_MACCR_CRC_APD (1 << 10)
+#define FTGMAC100_MACCR_RX_RUNT (1 << 12)
+#define FTGMAC100_MACCR_JUMBO_LF (1 << 13)
+#define FTGMAC100_MACCR_RX_ALL (1 << 14)
+#define FTGMAC100_MACCR_HT_MULTI_EN (1 << 15)
+#define FTGMAC100_MACCR_RX_MULTIPKT (1 << 16)
+#define FTGMAC100_MACCR_RX_BROADPKT (1 << 17)
+#define FTGMAC100_MACCR_DISCARD_CRCERR (1 << 18)
+#define FTGMAC100_MACCR_FAST_MODE (1 << 19)
+#define FTGMAC100_MACCR_SW_RST (1 << 31)
+
+/*
+ * PHY control register
+ */
+#define FTGMAC100_PHYCR_MDC_CYCTHR_MASK 0x3f
+#define FTGMAC100_PHYCR_MDC_CYCTHR(x) ((x) & 0x3f)
+#define FTGMAC100_PHYCR_PHYAD(x) (((x) & 0x1f) << 16)
+#define FTGMAC100_PHYCR_REGAD(x) (((x) & 0x1f) << 21)
+#define FTGMAC100_PHYCR_MIIRD (1 << 26)
+#define FTGMAC100_PHYCR_MIIWR (1 << 27)
+
+/*
+ * PHY data register
+ */
+#define FTGMAC100_PHYDATA_MIIWDATA(x) ((x) & 0xffff)
+#define FTGMAC100_PHYDATA_MIIRDATA(phydata) (((phydata) >> 16) & 0xffff)
+
+/*
+ * Transmit descriptor, aligned to 16 bytes
+ */
+struct ftgmac100_txdes {
+ unsigned int txdes0;
+ unsigned int txdes1;
+ unsigned int txdes2; /* not used by HW */
+ unsigned int txdes3; /* TXBUF_BADR */
+} __attribute__ ((aligned(16)));
+
+#define FTGMAC100_TXDES0_TXBUF_SIZE(x) ((x) & 0x3fff)
+#define FTGMAC100_TXDES0_EDOTR (1 << 15)
+#define FTGMAC100_TXDES0_CRC_ERR (1 << 19)
+#define FTGMAC100_TXDES0_LTS (1 << 28)
+#define FTGMAC100_TXDES0_FTS (1 << 29)
+#define FTGMAC100_TXDES0_TXDMA_OWN (1 << 31)
+
+#define FTGMAC100_TXDES1_VLANTAG_CI(x) ((x) & 0xffff)
+#define FTGMAC100_TXDES1_INS_VLANTAG (1 << 16)
+#define FTGMAC100_TXDES1_TCP_CHKSUM (1 << 17)
+#define FTGMAC100_TXDES1_UDP_CHKSUM (1 << 18)
+#define FTGMAC100_TXDES1_IP_CHKSUM (1 << 19)
+#define FTGMAC100_TXDES1_LLC (1 << 22)
+#define FTGMAC100_TXDES1_TX2FIC (1 << 30)
+#define FTGMAC100_TXDES1_TXIC (1 << 31)
+
+/*
+ * Receive descriptor, aligned to 16 bytes
+ */
+struct ftgmac100_rxdes {
+ unsigned int rxdes0;
+ unsigned int rxdes1;
+ unsigned int rxdes2; /* not used by HW */
+ unsigned int rxdes3; /* RXBUF_BADR */
+} __attribute__ ((aligned(16)));
+
+#define FTGMAC100_RXDES0_VDBC 0x3fff
+#define FTGMAC100_RXDES0_EDORR (1 << 15)
+#define FTGMAC100_RXDES0_MULTICAST (1 << 16)
+#define FTGMAC100_RXDES0_BROADCAST (1 << 17)
+#define FTGMAC100_RXDES0_RX_ERR (1 << 18)
+#define FTGMAC100_RXDES0_CRC_ERR (1 << 19)
+#define FTGMAC100_RXDES0_FTL (1 << 20)
+#define FTGMAC100_RXDES0_RUNT (1 << 21)
+#define FTGMAC100_RXDES0_RX_ODD_NB (1 << 22)
+#define FTGMAC100_RXDES0_FIFO_FULL (1 << 23)
+#define FTGMAC100_RXDES0_PAUSE_OPCODE (1 << 24)
+#define FTGMAC100_RXDES0_PAUSE_FRAME (1 << 25)
+#define FTGMAC100_RXDES0_LRS (1 << 28)
+#define FTGMAC100_RXDES0_FRS (1 << 29)
+#define FTGMAC100_RXDES0_RXPKT_RDY (1 << 31)
+
+#define FTGMAC100_RXDES1_VLANTAG_CI 0xffff
+#define FTGMAC100_RXDES1_PROT_MASK (0x3 << 20)
+#define FTGMAC100_RXDES1_PROT_NONIP (0x0 << 20)
+#define FTGMAC100_RXDES1_PROT_IP (0x1 << 20)
+#define FTGMAC100_RXDES1_PROT_TCPIP (0x2 << 20)
+#define FTGMAC100_RXDES1_PROT_UDPIP (0x3 << 20)
+#define FTGMAC100_RXDES1_LLC (1 << 22)
+#define FTGMAC100_RXDES1_DF (1 << 23)
+#define FTGMAC100_RXDES1_VLANTAG_AVAIL (1 << 24)
+#define FTGMAC100_RXDES1_TCP_CHKSUM_ERR (1 << 25)
+#define FTGMAC100_RXDES1_UDP_CHKSUM_ERR (1 << 26)
+#define FTGMAC100_RXDES1_IP_CHKSUM_ERR (1 << 27)
+
+#endif /* __FTGMAC100_H */
--
1.6.3.3
^ permalink raw reply related
* Re: [PATCHv2 1/9] at91: provide macb clks with "pclk" and "hclk" name
From: Russell King - ARM Linux @ 2011-03-17 10:00 UTC (permalink / raw)
To: Andrew Victor
Cc: nicolas.ferre, Jamie Iles, plagnioj, linux-arm-kernel, netdev
In-Reply-To: <AANLkTin9FH2orOaV-6feGDikCGvb3C-Q2CnRzp-Y2S4X@mail.gmail.com>
On Thu, Mar 17, 2011 at 11:22:37AM +0200, Andrew Victor wrote:
> hi Russell,
>
> >> There is no reference to a "pclk" or "hclk" in the AT91 architecture.
> >> So to avoid possible confusion, maybe create two "fake" clocks both
> >> parented to "macb_clk", and add a comment they're only for
> >> compatibility with the AVR32.
> >
> > It doesn't matter what's in the documentation.
> >
> > What matters more than conforming to documentation is keeping the drivers
> > in a clean and maintainable state without throwing lots of ifdefs into
> > them.
>
> I'm not saying the drivers need ifdefs, they should request both
> "pclk" and "hclk" as suggested.
>
> What I was suggesting is the platform clock setup on AT91 as:
> macb_clk
> |
> +-- hclk
> +-- pclk
>
> rather than:
> pclk
> |
> +-- hclk
And what I've been saying all along is to make pclk a _dummy_ clock on
the platform it doesn't exist for, rather than making it related in some
way to another clock given to the peripheral.
^ permalink raw reply
* Re: [PATCHv2 1/9] at91: provide macb clks with "pclk" and "hclk" name
From: Jamie Iles @ 2011-03-17 10:09 UTC (permalink / raw)
To: Russell King - ARM Linux
Cc: Andrew Victor, nicolas.ferre, Jamie Iles, plagnioj,
linux-arm-kernel, netdev
In-Reply-To: <20110317100010.GF29758@n2100.arm.linux.org.uk>
On Thu, Mar 17, 2011 at 10:00:10AM +0000, Russell King - ARM Linux wrote:
> On Thu, Mar 17, 2011 at 11:22:37AM +0200, Andrew Victor wrote:
> > hi Russell,
> >
> > >> There is no reference to a "pclk" or "hclk" in the AT91 architecture.
> > >> So to avoid possible confusion, maybe create two "fake" clocks both
> > >> parented to "macb_clk", and add a comment they're only for
> > >> compatibility with the AVR32.
> > >
> > > It doesn't matter what's in the documentation.
> > >
> > > What matters more than conforming to documentation is keeping the drivers
> > > in a clean and maintainable state without throwing lots of ifdefs into
> > > them.
> >
> > I'm not saying the drivers need ifdefs, they should request both
> > "pclk" and "hclk" as suggested.
> >
> > What I was suggesting is the platform clock setup on AT91 as:
> > macb_clk
> > |
> > +-- hclk
> > +-- pclk
> >
> > rather than:
> > pclk
> > |
> > +-- hclk
>
> And what I've been saying all along is to make pclk a _dummy_ clock on
> the platform it doesn't exist for, rather than making it related in some
> way to another clock given to the peripheral.
Ok, so just to summarize, before my patches, at91 provides "macb_clk",
whereas avr32 provides "pclk" and "hclk".
I've renamed at91's "macb_clk" to "pclk" and added a fake, unrelated
"hclk". It was suggested that the fake "hclk" should be a child of
"pclk" but you're saying to leave it as I have it right?
Jamie
^ permalink raw reply
* Re: [PATCH v2] net: add Faraday FTGMAC100 Gigabit Ethernet driver
From: Eric Dumazet @ 2011-03-17 10:24 UTC (permalink / raw)
To: Po-Yu Chuang; +Cc: netdev, linux-kernel, ratbert
In-Reply-To: <1300355238-1619-1-git-send-email-ratbert.chuang@gmail.com>
Le jeudi 17 mars 2011 à 17:47 +0800, Po-Yu Chuang a écrit :
> From: Po-Yu Chuang <ratbert@faraday-tech.com>
>
> FTGMAC100 Ethernet Media Access Controller supports 10/100/1000 Mbps
> and MII/GMII. This driver has been working on some ARM/NDS32 SoC's
> including Faraday A369 and Andes AG102.
>
> Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
> ---
Did you tried GRO support ?
^ permalink raw reply
* SO_BINDTODEVICE inconsistency between IPv4 and IPv6
From: David Woodhouse @ 2011-03-17 10:29 UTC (permalink / raw)
To: netdev; +Cc: Yuniverg, Michael, Yedvab, Nadav
[-- Attachment #1: Type: text/plain, Size: 4060 bytes --]
We've discovered strange behaviour when we listen on in6addr_any and use
SO_BINDTODEVICE to bind to the lo device.
We can connect to any IPv4 address that is local to the machine, on any
interface. (This is true whether we listen on AF_INET6/in6addr_any and
accept IPv4 connections on the IPv6 socket, or whether we just listen on
AF_INET/INADDR_ANY).
The IPv6 behaviour is different — the only IPv6 address that we can
connect to is ::1.
See attached test case, which listens with SO_BINDTODEVICE as described.
Note that it needs to be run as root because SO_BINDTODEVICE is a
privileged operation.
Why this difference? Ideally, we want the Legacy IP behaviour to happen
for IPv6 too; we want local clients to be able to connect to *any* local
IP address to talk to our service, but we don't want to accept
connections from the outside.
[root@macbook dwmw2]# uname -a
Linux macbook.infradead.org 2.6.35.11-83.fc14.x86_64 #1 SMP Mon Feb 7 07:06:44 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
[root@macbook dwmw2]# ./port -port 9999 &
Attempt to listening at port: 9999 ...successfully binded local
Block until interrupted by a signal (Ctrl+C or kill) ...
[1] 26839
[root@macbook dwmw2]# host macbook
macbook.infradead.org has address 90.155.92.212
macbook.infradead.org has IPv6 address 2001:8b0:10b:1:216:eaff:fe05:bbb8
[root@macbook dwmw2]# telnet 90.155.92.212 9999
Trying 90.155.92.212...
Connected to macbook.infradead.org (90.155.92.212).
Escape character is '^]'.
^]close
telnet> close
Connection closed.
[root@macbook dwmw2]# telnet 127.0.0.1 9999
Trying 127.0.0.1...
Connected to macbook.infradead.org (127.0.0.1).
Escape character is '^]'.
^]close
telnet> close
Connection closed.
[root@macbook dwmw2]# telnet ::1 9999
Trying ::1...
Connected to macbook.infradead.org (::1).
Escape character is '^]'.
^]close
telnet> close
Connection closed.
[root@macbook dwmw2]# telnet 2001:8b0:10b:1:216:eaff:fe05:bbb8 9999
Trying 2001:8b0:10b:1:216:eaff:fe05:bbb8...
telnet: connect to address 2001:8b0:10b:1:216:eaff:fe05:bbb8: Connection refused
telnet: Unable to connect to remote host: Connection refused
[root@macbook dwmw2]# ip -6 route list table local
local ::1 via :: dev lo proto none metric 0 mtu 16436 rtt 10ms rttvar 10ms cwnd 3 advmss 16376 hoplimit 0
local 2001:8b0:10b:1:216:eaff:fe05:bbb8 via :: dev lo proto none metric 0 mtu 16436 advmss 16376 hoplimit 0
local fe80::216:eaff:fe05:bbb8 via :: dev lo proto none metric 0 mtu 16436 advmss 16376 hoplimit 0
ff02::1 via ff02::1 dev wlan0 metric 0
cache mtu 1500 advmss 1440 hoplimit 0
ff00::/8 dev wlan0 metric 256 mtu 1500 advmss 1440 hoplimit 0
[root@macbook dwmw2]# ip addr list
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
link/ether 00:22:41:2d:31:0a brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether 00:16:ea:05:bb:b8 brd ff:ff:ff:ff:ff:ff
inet 90.155.92.212/26 brd 90.155.92.255 scope global wlan0
inet6 2001:8b0:10b:1:216:eaff:fe05:bbb8/64 scope global dynamic
valid_lft 294sec preferred_lft 114sec
inet6 fe80::216:eaff:fe05:bbb8/64 scope link
valid_lft forever preferred_lft forever
4: virbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link/ether b2:5e:9d:17:67:ce brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
5: virbr1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link/ether 16:7e:11:12:43:09 brd ff:ff:ff:ff:ff:ff
inet 192.168.100.1/24 brd 192.168.100.255 scope global virbr1
7: vpn0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1266 qdisc pfifo_fast state UNKNOWN qlen 500
link/none
inet 10.255.16.41/22 brd 10.255.19.255 scope global vpn0
--
dwmw2
[-- Attachment #2: port.c --]
[-- Type: text/x-csrc, Size: 4462 bytes --]
/*! @file port.c
* @brief Test socket with/without setsockopt(..,SO_BINDTODEVICE,..)
*
*
*
* @b Usage: ./port -port portNum
*
*
* @b Author/Date: Michael Yuniverg, 17 March 2011
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <errno.h>
#include <ifaddrs.h>
#include <string.h>
#include <signal.h>
#include <sys/file.h>
#include <net/if.h>
static char *pid_file = NULL;
static int s = -1;
struct addrinfo *paddrp = NULL;
void exitcleanup()
{
if (pid_file) {
unlink(pid_file);
}
if (paddrp) {
freeaddrinfo(paddrp);
}
}
void terminationHandler(int signum, siginfo_t *sinfo, void *dummy)
{
//printf("Received termination signal:%d Err:(%d) Code:(%d)\n", signum, sinfo->si_errno, sinfo->si_code);
if (-1 != s) {
close(s);
}
exit(EXIT_SUCCESS);
}
void setTerminationHandler()
{
int sigSet = 0;
// Termination signal handler.
struct sigaction terminateAction;
// Set up the structure to specify the termination action.
terminateAction.sa_sigaction = terminationHandler;
sigemptyset(&terminateAction.sa_mask);
terminateAction.sa_flags = SA_SIGINFO;
sigSet &= sigaction(SIGTERM, &terminateAction, NULL);
sigSet &= sigaction(SIGQUIT, &terminateAction, NULL);
sigSet &= sigaction(SIGINT, &terminateAction, NULL);
sigSet &= sigaction(SIGHUP, &terminateAction, NULL);
sigSet &= sigaction(SIGPIPE, &terminateAction, NULL);
sigSet &= sigaction(SIGALRM, &terminateAction, NULL);
sigSet &= sigaction(SIGUSR1, &terminateAction, NULL);
sigSet &= sigaction(SIGUSR2, &terminateAction, NULL);
if (sigSet != 0) {
printf("Failed to register terminate signal handler\n");
}
}
void Usage() {
printf ("usage: port [options]\n");
printf (" -port <port_num> : indicate which port to listen at\n");
}
int main(int argc, char* argv[])
{
char *port = NULL;
struct addrinfo hints, *paddr;
int backlog = 5;
int i, err;
int res = -1;
// ---------------- Parse Options -----------------------------
if (argc < 2) {
Usage();
return -1;
}
for (i = 1; i < argc; i++) {
if (!strcmp(argv[i], "-port")) {
port = argv[++i];
} else if (!strcmp(argv[i], "-file")) {
pid_file = argv[++i];
} else {
Usage();
return -1;
}
}
if (port == NULL) {
Usage();
return -1;
}
setTerminationHandler();
atexit(exitcleanup);
memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_INET6;
hints.ai_socktype = SOCK_STREAM;
hints.ai_protocol = 0;
#ifdef AI_NUMERICSERV
hints.ai_flags |= AI_NUMERICSERV;
#endif
hints.ai_flags |= AI_PASSIVE;
if (getaddrinfo(NULL, port, &hints, &paddrp) != 0) {
goto error;
}
for (paddr = paddrp; paddr != NULL; paddr = paddr->ai_next) {
struct sockaddr_in *sinp;
sinp = (struct sockaddr_in *)paddr->ai_addr;
printf ("Attempt to listening at port: %d ...", ntohs(sinp->sin_port));
s= socket(paddr->ai_family, paddr->ai_socktype, paddr->ai_protocol);
if (s < 0) {
goto error;
}
/* the problematic system call */
const char *device = "lo";
struct ifreq ifr;
strcpy(ifr.ifr_name, device);
if(setsockopt(s,SOL_SOCKET,SO_BINDTODEVICE, &ifr,sizeof(ifr)) == -1)
{
//error = errno;
perror("SO_BINDTODEVICE");
close(s);
return -1;
}
printf("successfully binded local\n");
/* end of problematic system call */
if (bind(s, paddr->ai_addr, paddr->ai_addrlen) == -1) {
close(s);
printf ("bind failed. Exiting\n");
return -1;
}
if (listen(s, backlog) == -1) {
close(s);
goto error;
}
printf ("Block until interrupted by a signal (Ctrl+C or kill) ...\n");
select(1, NULL, NULL, NULL, NULL);
}
close(s);
return 0;
error:
//err = GetLastError();
//printf ("FAIL (0x%x)\n", err);
//DisplayError(err) ;
return -1;
}
^ permalink raw reply
* [PATCH] netfilter: xtables: fix reentrancy
From: Eric Dumazet @ 2011-03-17 10:35 UTC (permalink / raw)
To: David Miller, Jan Engelhardt; +Cc: kaber, netfilter-devel, netdev, hawk
In-Reply-To: <20110316.131648.15245216.davem@davemloft.net>
Le mercredi 16 mars 2011 à 13:16 -0700, David Miller a écrit :
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Wed, 16 Mar 2011 20:00:05 +0100
>
> > We currently use a percpu spinlock to 'protect' rule bytes/packets
> > counters, after various attempts to use RCU instead.
> >
> > Lately we added a seqlock so that get_counters() can run without
> > blocking BH or 'writers'. But we really use the seqcount in it.
> >
> > Spinlock itself is only locked by the current cpu, so we can remove it
> > completely.
> >
> > This cleanups api, using correct 'writer' vs 'reader' semantic.
> >
> > At replace time, the get_counters() call makes sure all cpus are done
> > using the old table.
> >
> > We could probably avoid blocking BH (we currently block them in xmit
> > path), but thats a different topic ;)
> >
> > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
>
> FWIW, I think this is a great idea.
I knew you would be interested :)
While looking at it (and trying to only require preemption disabled
instead of BH disabled), I believe stackptr management is not safe.
I suggest following patch to make sure we restore *stackptr to origptr
before enabling BH (or preemption later)
Thanks
[PATCH] netfilter: xtables: fix reentrancy
commit f3c5c1bfd4308 (make ip_tables reentrant) introduced a race in
handling the stackptr restore, at the end of ipt_do_table()
We should do it before the call to xt_info_rdunlock_bh(), or we allow
cpu preemption and another cpu overwrites stackptr of original one.
A second fix is to change the underflow test to check the origptr value
instead of 0 to detect underflow, or else we allow a jump from different
hooks.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Jan Engelhardt <jengelh@medozas.de>
Cc: Patrick McHardy <kaber@trash.net>
---
net/ipv4/netfilter/ip_tables.c | 4 ++--
net/ipv6/netfilter/ip6_tables.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index b09ed0d..ffcea0d 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -387,7 +387,7 @@ ipt_do_table(struct sk_buff *skb,
verdict = (unsigned)(-v) - 1;
break;
}
- if (*stackptr == 0) {
+ if (*stackptr <= origptr) {
e = get_entry(table_base,
private->underflow[hook]);
pr_debug("Underflow (this is normal) "
@@ -427,10 +427,10 @@ ipt_do_table(struct sk_buff *skb,
/* Verdict */
break;
} while (!acpar.hotdrop);
- xt_info_rdunlock_bh();
pr_debug("Exiting %s; resetting sp from %u to %u\n",
__func__, *stackptr, origptr);
*stackptr = origptr;
+ xt_info_rdunlock_bh();
#ifdef DEBUG_ALLOW_ALL
return NF_ACCEPT;
#else
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index c9598a9..0b2af9b 100644
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -410,7 +410,7 @@ ip6t_do_table(struct sk_buff *skb,
verdict = (unsigned)(-v) - 1;
break;
}
- if (*stackptr == 0)
+ if (*stackptr <= origptr)
e = get_entry(table_base,
private->underflow[hook]);
else
@@ -441,8 +441,8 @@ ip6t_do_table(struct sk_buff *skb,
break;
} while (!acpar.hotdrop);
- xt_info_rdunlock_bh();
*stackptr = origptr;
+ xt_info_rdunlock_bh();
#ifdef DEBUG_ALLOW_ALL
return NF_ACCEPT;
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* Re: [RFC] netfilter: get rid of atomic ops in fast path
From: Patrick McHardy @ 2011-03-17 10:39 UTC (permalink / raw)
To: Eric Dumazet
Cc: Netfilter Development Mailinglist, netdev, Jesper Dangaard Brouer
In-Reply-To: <1300302005.3202.23.camel@edumazet-laptop>
Am 16.03.2011 20:00, schrieb Eric Dumazet:
> We currently use a percpu spinlock to 'protect' rule bytes/packets
> counters, after various attempts to use RCU instead.
>
> Lately we added a seqlock so that get_counters() can run without
> blocking BH or 'writers'. But we really use the seqcount in it.
>
> Spinlock itself is only locked by the current cpu, so we can remove it
> completely.
>
> This cleanups api, using correct 'writer' vs 'reader' semantic.
>
> At replace time, the get_counters() call makes sure all cpus are done
> using the old table.
>
> We could probably avoid blocking BH (we currently block them in xmit
> path), but thats a different topic ;)
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> ---
> This is a POC patch (based on net-next-2.6), only handling ip_tables.
> ip6/arp/... need similar changes.
Thanks Eric, this looks good to me.
^ permalink raw reply
* Re: [PATCH v2] net: add Faraday FTGMAC100 Gigabit Ethernet driver
From: Po-Yu Chuang @ 2011-03-17 10:56 UTC (permalink / raw)
To: Eric Dumazet; +Cc: netdev, linux-kernel, ratbert
In-Reply-To: <1300357457.3133.92.camel@edumazet-laptop>
Hi Eric,
On Thu, Mar 17, 2011 at 6:24 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Le jeudi 17 mars 2011 à 17:47 +0800, Po-Yu Chuang a écrit :
>> From: Po-Yu Chuang <ratbert@faraday-tech.com>
>>
>> FTGMAC100 Ethernet Media Access Controller supports 10/100/1000 Mbps
>> and MII/GMII. This driver has been working on some ARM/NDS32 SoC's
>> including Faraday A369 and Andes AG102.
>>
>> Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
>> ---
>
> Did you tried GRO support ?
No, I don't understand how to do that yet. Let me do some study first.
I'd really appreciate it if you could provide me some pointers about GRO. :-)
Is there any document about it?
best regards,
Po-Yu Chuang
^ permalink raw reply
* Re: sctp panic
From: richard -rw- weinberger @ 2011-03-17 11:20 UTC (permalink / raw)
To: walter schloegl; +Cc: linux-kernel, netdev
In-Reply-To: <20110317104903.153050@gmx.net>
On Thu, Mar 17, 2011 at 11:49 AM, walter schloegl <sctp@muskelshirt.de> wrote:
>
> -------- Original-Nachricht --------
>> Datum: Thu, 17 Mar 2011 08:56:47 +0100
>> Von: richard -rw- weinberger <richard.weinberger@gmail.com>
>> An: sctp@muskelshirt.de
>> CC: linux-kernel@vger.kernel.org
>> Betreff: Re: sctp panic
>
>> On Thu, Mar 17, 2011 at 8:43 AM, <sctp@muskelshirt.de> wrote:
>> > Hi
>> >
>> > when doing the actions below I get a panic.
>> >
>> > - echo 1 > /proc/sys/net/sctp/addip_enable
>> > - In a C-Programm
>> > - socket(AF_INET,SOCK_STREAM,IPPROTO_SCTP);
>> > - connect(....) (with correct filled parameters)
>> >
>> > Its no process (waiting in accept) neccessary
>>
>> Can you show us the panic message and your C prorgam?
>> This would help reproducing the panic...
>
> The C-Code is:
>
> #include <sys/socket.h>
> #include <netinet/in.h>
> #include <netdb.h>
> #include <stdio.h>
> #include <errno.h>
> #include <unistd.h>
> #include "sctp.h"
>
>
> int
> main(int ac,char **av)
> {
>
> int s;
> char *remhost;
> int port;
> struct hostent *hp;
> struct sockaddr_in server;
>
> if (ac != 3) {
> printf("usage: %s ip-addr port\n",av[0]);
> exit(1);
> }
>
> remhost = av[1];
> port = atoi(av[2]);
>
>
> server.sin_port = htons(port);
> server.sin_family = AF_INET;
> hp = gethostbyname(remhost);
> if (hp == 0) {
> fprintf(stderr,"unknown host %s\n",remhost);
> exit(1);
> }
> memcpy((char *)&server.sin_addr,(char *)hp->h_addr,hp->h_length);
>
> if ((s = socket(AF_INET,SOCK_STREAM,IPPROTO_SCTP)) < 0) {
> fprintf(stderr,"socket IPPROTO_SCTP proc %d failed errno %d\n",getpid(),errno);
> close(s);
> exit(1);
> }
>
> if (connect(s,(struct sockaddr *)&server,sizeof server) < 0) {
> fprintf(stderr,"connect failed errno %d\n",errno);
> close(s);
> exit(1);
> }
> }
>
> The crash says:
>
> crash> bt
> PID: 14646 TASK: ffff8801f40c7560 CPU: 9 COMMAND: "x"
> #0 [ffff8801f6f5f6f0] machine_kexec at ffffffff8103697b
> #1 [ffff8801f6f5f750] crash_kexec at ffffffff810b9078
> #2 [ffff8801f6f5f820] oops_end at ffffffff814cc900
> #3 [ffff8801f6f5f850] die at ffffffff8101733b
> #4 [ffff8801f6f5f880] do_trap at ffffffff814cc1d4
> #5 [ffff8801f6f5f8e0] do_invalid_op at ffffffff81014ee5
> #6 [ffff8801f6f5f980] invalid_op at ffffffff81013f5b
> [exception RIP: skb_over_panic+93]
> RIP: ffffffff81404bdd RSP: ffff8801f6f5fa38 RFLAGS: 00010296
> RAX: 0000000000000083 RBX: 0000000000000040 RCX: 00000000000013f6
> RDX: 0000000000000000 RSI: 0000000000000046 RDI: 0000000000000246
> RBP: ffff8801f6f5fa58 R8: ffffffff818a3da0 R9: 0000000000000000
> R10: 0000000000000001 R11: 0000000000000000 R12: ffff8801f4e11000
> R13: 0000000000000004 R14: 000000000000003e R15: 0000000000000001
> ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018
> #7 [ffff8801f6f5fa60] skb_put at ffffffff81405c1c
> #8 [ffff8801f6f5fa80] sctp_addto_chunk at ffffffffa0503c23
> #9 [ffff8801f6f5fad0] sctp_make_init at ffffffffa0506705
> #10 [ffff8801f6f5fba0] sctp_sf_do_prm_asoc at ffffffffa04f81d4
> #11 [ffff8801f6f5fbd0] sctp_do_sm at ffffffffa04fd381
> #12 [ffff8801f6f5fd60] sctp_primitive_ASSOCIATE at ffffffffa0513daf
> #13 [ffff8801f6f5fd80] __sctp_connect at ffffffffa0510f09
> #14 [ffff8801f6f5fe50] sctp_connect at ffffffffa0511248
> #15 [ffff8801f6f5fe80] inet_dgram_connect at ffffffff81471b6c
> #16 [ffff8801f6f5feb0] sys_connect at ffffffff813ff747
> #17 [ffff8801f6f5ff80] system_call_fastpath at ffffffff81013172
> RIP: 0000003015ee2150 RSP: 00007fffea7bdce8 RFLAGS: 00010206
> RAX: 000000000000002a RBX: ffffffff81013172 RCX: 0000000000000000
> RDX: 0000000000000010 RSI: 00007fffea7bdd00 RDI: 0000000000000003
> RBP: 00007fffea7bdd40 R8: 0000000000759020 R9: ff00000000000000
> R10: 00007fffea7bda70 R11: 0000000000000246 R12: 0000000000000000
> R13: 00007fffea7bde20 R14: 00000000004006e0 R15: 0000000000000000
> ORIG_RAX: 000000000000002a CS: 0033 SS: 002b
>
>
> One more Info:
> When calling my programm with 127.0.0.1 as remote ip-addr I get a:
> connect failed errno 111
>
> When calling it with a "non local" address (and also no "accept process" running) I get the Panic.
>
>
>>
>> > br
>> > walter
>> > --
>> > GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
>> > gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
>> > --
>> > To unsubscribe from this list: send the line "unsubscribe linux-kernel"
>> in
>> > the body of a message to majordomo@vger.kernel.org
>> > More majordomo info at http://vger.kernel.org/majordomo-info.html
>> > Please read the FAQ at http://www.tux.org/lkml/
>> >
>>
>> --
>> Thanks,
>> //richard
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at http://www.tux.org/lkml/
>
> --
> NEU: FreePhone - kostenlos mobil telefonieren und surfen!
> Jetzt informieren: http://www.gmx.net/de/go/freephone
>
CC'ing netdev
--
Thanks,
//richard
^ permalink raw reply
* Re: [PATCH v2] net: add Faraday FTGMAC100 Gigabit Ethernet driver
From: Eric Dumazet @ 2011-03-17 11:30 UTC (permalink / raw)
To: Po-Yu Chuang; +Cc: netdev, linux-kernel, ratbert
In-Reply-To: <AANLkTino6LzGTZF4fNSkV9pbAfnmAc8wJjk0L8HfHDiJ@mail.gmail.com>
Le jeudi 17 mars 2011 à 18:56 +0800, Po-Yu Chuang a écrit :
> Hi Eric,
>
> On Thu, Mar 17, 2011 at 6:24 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> > Le jeudi 17 mars 2011 à 17:47 +0800, Po-Yu Chuang a écrit :
> >> From: Po-Yu Chuang <ratbert@faraday-tech.com>
> >>
> >> FTGMAC100 Ethernet Media Access Controller supports 10/100/1000 Mbps
> >> and MII/GMII. This driver has been working on some ARM/NDS32 SoC's
> >> including Faraday A369 and Andes AG102.
> >>
> >> Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
> >> ---
> >
> > Did you tried GRO support ?
>
> No, I don't understand how to do that yet. Let me do some study first.
> I'd really appreciate it if you could provide me some pointers about GRO. :-)
> Is there any document about it?
Should be easy and might help performance too.
Take a look at commit :
2edae08e5b75269855fef3c74fe4292c066e7c33 (r8169: add gro support)
^ permalink raw reply
* [PATCH v2] ipv4: netfilter: ipt_CLUSTERIP: fix buffer overflow
From: Vasiliy Kulikov @ 2011-03-17 11:32 UTC (permalink / raw)
To: Patrick McHardy
Cc: Changli Gao, linux-kernel, security, David S. Miller,
Alexey Kuznetsov, James Morris, Hideaki YOSHIFUJI,
netfilter-devel, netfilter, coreteam, netdev
In-Reply-To: <4D7F5CAC.6070006@trash.net>
'buffer' string is copied from userspace. It is not checked whether it is
zero terminated. This may lead to overflow inside of simple_strtoul().
Changli Gao suggested to copy not more than user supplied 'size' bytes.
It was introduced before the git epoch. Files "ipt_CLUSTERIP/*" are
root writable only by default, however, on some setups permissions might be
relaxed to e.g. network admin user.
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
---
net/ipv4/netfilter/ipt_CLUSTERIP.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c
index 1e26a48..af7dec6 100644
--- a/net/ipv4/netfilter/ipt_CLUSTERIP.c
+++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c
@@ -669,8 +669,11 @@ static ssize_t clusterip_proc_write(struct file *file, const char __user *input,
char buffer[PROC_WRITELEN+1];
unsigned long nodenum;
- if (copy_from_user(buffer, input, PROC_WRITELEN))
+ if (size > PROC_WRITELEN)
+ return -EIO;
+ if (copy_from_user(buffer, input, size))
return -EFAULT;
+ buffer[size] = 0;
if (*buffer == '+') {
nodenum = simple_strtoul(buffer+1, NULL, 10);
--
1.7.0.4
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox