Re: [PATCH 4.11] genetlink: fix counting regression on ctrl_dumpfamily()
On 22.03.2017 16:08, Stanislaw Gruszka wrote: > Commit 2ae0f17df1cd ("genetlink: use idr to track families") replaced > > if (++n < fams_to_skip) > continue; > into: > > if (n++ < fams_to_skip) > continue; > > This subtle change cause that on retry ctrl_dumpfamily() call we omit > one family that failed to do ctrl_fill_info() on previous call, because > cb->args[0] = n number counts also family that failed to do > ctrl_fill_info(). > > Patch fixes the problem and avoid confusion in the future just decrease > n counter when ctrl_fill_info() fail. > > User visible problem caused by this bug is failure to get access to > some genetlink family i.e. nl80211. However problem is reproducible > only if number of registered genetlink families is big enough to > cause second call of ctrl_dumpfamily(). > > Cc: Xose Vazquez Perez <xose.vazq...@gmail.com> > Cc: Larry Finger <larry.fin...@lwfinger.net> > Cc: Johannes Berg <johan...@sipsolutions.net> > Fixes: 2ae0f17df1cd ("genetlink: use idr to track families") > Signed-off-by: Stanislaw Gruszka <sgrus...@redhat.com> > --- > Dave, please also target this for 4.10+ -stable. > > net/netlink/genetlink.c |4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c > index fb6e10f..92e0981 100644 > --- a/net/netlink/genetlink.c > +++ b/net/netlink/genetlink.c > @@ -783,8 +783,10 @@ static int ctrl_dumpfamily(struct sk_buff *skb, struct > netlink_callback *cb) > > if (ctrl_fill_info(rt, NETLINK_CB(cb->skb).portid, > cb->nlh->nlmsg_seq, NLM_F_MULTI, > -skb, CTRL_CMD_NEWFAMILY) < 0) > + skb, CTRL_CMD_NEWFAMILY) < 0) { > + n--; > break; > + } > } > > cb->args[0] = n; > Thanks Stanislaw, Larry! Tested-by: poma <p...@gmail.com> Ref. https://bugzilla.redhat.com/show_bug.cgi?id=1422247
Re: [PATCH 06/11] net: usb: mcs7830: use new api ethtool_{get|set}_link_ksettings
On 16.03.2017 23:18, Philippe Reynes wrote: > The ethtool api {get|set}_settings is deprecated. > We move this driver to new api {get|set}_link_ksettings. > > As I don't have the hardware, I'd be very pleased if > someone may test this patch. > > Signed-off-by: Philippe Reynes <trem...@gmail.com> > --- > drivers/net/usb/mcs7830.c |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/usb/mcs7830.c b/drivers/net/usb/mcs7830.c > index 4f345bd..5771ff2 100644 > --- a/drivers/net/usb/mcs7830.c > +++ b/drivers/net/usb/mcs7830.c > @@ -464,9 +464,9 @@ static void mcs7830_get_regs(struct net_device *net, > struct ethtool_regs *regs, > .get_link = usbnet_get_link, > .get_msglevel = usbnet_get_msglevel, > .set_msglevel = usbnet_set_msglevel, > - .get_settings = usbnet_get_settings, > - .set_settings = usbnet_set_settings, > .nway_reset = usbnet_nway_reset, > + .get_link_ksettings = usbnet_get_link_ksettings, > + .set_link_ksettings = usbnet_set_link_ksettings, > }; > > static const struct net_device_ops mcs7830_netdev_ops = { > $ modinfo mcs7830 usbnet mii -n /lib/modules/4.11.0-0.rc3.git0.1.fc26.x86_64/updates/mcs7830.ko /lib/modules/4.11.0-0.rc3.git0.1.fc26.x86_64/updates/usbnet.ko /lib/modules/4.11.0-0.rc3.git0.1.fc26.x86_64/updates/mii.ko $ lsmod | grep mcs7830 mcs783016384 0 usbnet 45056 1 mcs7830 mii16384 2 usbnet,mcs7830 $ nmcli -f GENERAL.DRIVER,GENERAL.STATE device show enp0s4f1u4 GENERAL.DRIVER: MOSCHIP usb-ethernet driver GENERAL.STATE: 100 (connected) Tested-by: poma <p...@gmail.com>
Re: GDM7240 - NULL pointer dereference
On 03.04.2016 12:15, Alex wrote: > Hello, > [1.] System hang when connecting USB modem (LU150) > [2.] I'm running 4.4.5 kernel (Arch Linux). When this modem is connected > I'm getting below trace in journal and system becomes unusable - lsusb, > logout and some other operations lead to a complete hang, the only way > out is hardware power off. This modem works perfectly on 4.1.20 kernel - > attaching all outputs for both kernels. ... See if it is related to http://thread.gmane.org/gmane.linux.usb.general/135626 if so, kernel >= 4.5 i.e. https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/drivers/net/usb/cdc_ether.c?h=linux-4.5.y=29c6dd5
Re: [PATCH net 1/1] r8169: fix sleepable allocation during netdevice stats retrieval.
On 10.09.2015 10:47, Corinna Vinschen wrote: > On Sep 10 01:51, poma wrote: >> [PATCH v2] r8169: Fix sleeping function called during get_stats64 >> http://www.spinics.net/lists/netdev/msg342490.html >> - the noise is still present >> >> Corinna, care to share kernel-core & kernel-modules you are testing with, >> to unravel the Gordian Knot? > > Somehow your initrd seem to refuse to pick up the new kernel module. > > Here's basically what I do: > > - Test system is RHEL7 > > - git clone git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git > > - edit drivers/net/ethernet/realtek/r8169.c > > - make config; make -j42 > > - make install_modules && make install > > - init 6 > > Alternatively, if you already did the above once: > > - git am http://www.spinics.net/lists/netdev/msg342490.html> > > - make modules > > - cp drivers/net/ethernet/realtek/r8169.ko \ > /lib/modules/4.2.0+/kernel/drivers/net/ethernet/realtek/r8169.c > > - dracut -f --kver '4.2.0+' > > - init 6 > > > Corinna > [PATCH v3] r8169: Fix sleeping function called during get_stats64, v2 http://marc.info/?l=linux-netdev=144187488130444=raw # dracut --omit-drivers r8169 -f --kver 4.3.0-0.rc0.git11.1.fc24.x86_64 - the noise is gone Tested-by: poma <pomidorabelis...@gmail.com> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net 1/1] r8169: fix sleepable allocation during netdevice stats retrieval.
[PATCH net] r8169: Fix sleeping function called during get_stats64 http://marc.info/?l=linux-netdev=144180123410135=raw - the noise is still present -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net 1/1] r8169: fix sleepable allocation during netdevice stats retrieval.
[PATCH v2] r8169: Fix sleeping function called during get_stats64 http://www.spinics.net/lists/netdev/msg342490.html - the noise is still present Corinna, care to share kernel-core & kernel-modules you are testing with, to unravel the Gordian Knot? -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net 1/1] r8169: fix sleepable allocation during netdevice stats retrieval.
On 09/09/2015 09:08 PM, Corinna Vinschen wrote: > On Sep 9 20:34, poma wrote: >> On 09/09/2015 05:55 PM, Corinna Vinschen wrote: >>> On Sep 9 17:54, Corinna Vinschen wrote: >>>> On Sep 9 17:24, poma wrote: >>>>> [PATCH net] r8169: Fix sleeping function called during get_stats64 >>>>> http://marc.info/?l=linux-netdev=144180123410135=raw >>>>> - the noise is still present >>>> >>>> Are you really sure? The entire dma_alloc/dma_free stuff has been moved >>>> away. There's no locking or sleeping involved different from what was >>>> there before my original patch when calling .ndo_get_stats64. >>>> >> >> >> It is literally the kernel ring buffer output, >> so I really can not understand your question. > > I'm asking because I'm wondering if you're actually testing the > right r8169.ko module, the one with the patch applied. See below. > I already explained the patching/building procedure http://www.spinics.net/lists/netdev/msg342268.html >>>> How would I be able to reproduce this on the command line? >> >> This I have already written, here's once more for you, >> >> This noise is induced via userspace, xfce4-netload-plugin, >> http://goodies.xfce.org/projects/panel-plugins/xfce4-netload-plugin >> >> $ grep -i device .config/xfce4/panel/netload-16.rc >> Network_Device=enp3s0 >> >> $ ethtool -i enp3s0 | grep driver >> driver: r8169 >> >> >> Therefore, to try to reproduce this issue, 'xfce4-netload-plugin' must run >> within 'xfce4-panel', >> moreover 'xfce4-netload-plugin' must be configured to monitor affected >> network interface. > > I'lll see if I can try this tomorrow. > >> No command line this time, hombre. > This is how I managed to reproduce the noise within the CLI - via 'ifconfig', no need to pre-configure interface: # ifconfig enp3s0 up # dmesg [ 390.128904] r8169 :03:00.0 enp3s0: link down [ 390.129669] IPv6: ADDRCONF(NETDEV_UP): enp3s0: link is not ready # ifconfig # dmesg [ 393.855932] === [ 393.855937] [ INFO: suspicious RCU usage. ] [ 393.855945] 4.3.0-0.rc0.git9.1.fc24.x86_64 #1 Not tainted [ 393.855949] --- [ 393.855956] include/linux/rcupdate.h:579 Illegal context switch in RCU read-side critical section! [ 393.855960] other info that might help us debug this: [ 393.855970] rcu_scheduler_active = 1, debug_locks = 0 [ 393.855977] 2 locks held by ifconfig/2642: [ 393.855981] #0: (>lock){+.+.+.}, at: [] seq_read+0x4c/0x3e0 [ 393.856004] #1: (rcu_read_lock){..}, at: [] dev_seq_start+0x5/0x140 [ 393.856022] stack backtrace: [ 393.856032] CPU: 1 PID: 2642 Comm: ifconfig Not tainted 4.3.0-0.rc0.git9.1.fc24.x86_64 #1 ... [ 393.856072] Call Trace: [ 393.856084] [] dump_stack+0x4b/0x63 [ 393.856095] [] lockdep_rcu_suspicious+0xd7/0x110 [ 393.856104] [] ___might_sleep+0xa7/0x230 [ 393.856111] [] __might_sleep+0x49/0x80 [ 393.856120] [] __alloc_pages_nodemask+0x2fe/0xb90 [ 393.856129] [] ? debug_lockdep_rcu_enabled+0x1d/0x20 [ 393.856139] [] ? sched_clock+0x9/0x10 [ 393.856146] [] ? local_clock+0x1c/0x20 [ 393.856154] [] ? debug_lockdep_rcu_enabled+0x1d/0x20 [ 393.856164] [] dma_generic_alloc_coherent+0x96/0x130 [ 393.856173] [] x86_swiotlb_alloc_coherent+0x25/0x50 [ 393.856240] [] dma_alloc_attrs+0x6d/0xe0 [ 393.856256] [] rtl8169_map_counters+0x3e/0x70 [r8169] [ 393.856278] [] rtl8169_update_counters+0x64/0x140 [r8169] [ 393.856291] [] rtl8169_get_stats64+0xbf/0x130 [r8169] [ 393.856307] [] dev_get_stats+0x54/0x100 [ 393.856316] [] dev_seq_printf_stats+0x37/0x120 [ 393.856327] [] dev_seq_show+0x14/0x30 [ 393.856334] [] seq_read+0x2fa/0x3e0 [ 393.856345] [] proc_reg_read+0x42/0x70 [ 393.856358] [] __vfs_read+0x37/0x100 [ 393.856368] [] ? security_file_permission+0xa3/0xc0 [ 393.856376] [] vfs_read+0x86/0x130 [ 393.856384] [] SyS_read+0x58/0xd0 [ 393.856393] [] entry_SYSCALL_64_fastpath+0x12/0x76 [ 393.856402] BUG: sleeping function called from invalid context at mm/page_alloc.c:3186 [ 393.856408] in_atomic(): 1, irqs_disabled(): 0, pid: 2642, name: ifconfig [ 393.856412] INFO: lockdep is turned off. [ 393.856420] CPU: 1 PID: 2642 Comm: ifconfig Not tainted 4.3.0-0.rc0.git9.1.fc24.x86_64 #1 ... [ 393.856467] Call Trace: [ 393.856476] [] dump_stack+0x4b/0x63 [ 393.856484] [] ___might_sleep+0x179/0x230 [ 393.856493] [] __might_sleep+0x49/0x80 [ 393.856501] [] __alloc_pages_nodemask+0x2fe/0xb90 [ 393.856513] [] ? debug_lockdep_rcu_enabled+0x1d/0x20 [ 393.856522] [] ? sched_clock+0x9/0x10 [ 393.856529] [] ? local_clock+0x1c/0x20 [ 393.856537] [] ? debug_lockdep_rcu_ena
Re: [PATCH net 1/1] r8169: fix sleepable allocation during netdevice stats retrieval.
On 09.09.2015 21:04, David Miller wrote: > From: poma <pomidorabelis...@gmail.com> > Date: Wed, 9 Sep 2015 20:34:36 +0200 > >> [ 230.110233] [] dma_generic_alloc_coherent+0x96/0x130 >> [ 230.110242] [] x86_swiotlb_alloc_coherent+0x25/0x50 >> [ 230.110250] [] dma_alloc_attrs+0x6d/0xe0 >> [ 230.110265] [] rtl8169_map_counters+0x3e/0x70 [r8169] >> [ 230.110277] [] rtl8169_update_counters+0x64/0x140 >> [r8169] >> [ 230.110289] [] rtl8169_get_stats64+0xbf/0x130 [r8169] >> [ 230.110299] [] dev_get_stats+0x54/0x100 > > The patch in question removes this call to dma_alloc_coherent() so you > aren't running a kernel which actually has the patch applied. > Here is the obvious example - in use is what is patched: $ grep MODULE_DESCRIPTION rpmbuild/BUILD/kernel-4.2.fc24/linux-4.3.0-0.rc0.git9.1.fc24.x86_64/drivers/net/ethernet/realtek/r8169.c MODULE_DESCRIPTION("RealTek RTL-8169 Gigabit Ethernet driver patched with [PATCH v2] r8169: Fix sleeping function called during get_stats64"); $ modinfo -n r8169; modinfo -d r8169 /lib/modules/4.3.0-0.rc0.git9.1.fc24.x86_64/updates/r8169.ko RealTek RTL-8169 Gigabit Ethernet driver patched with [PATCH v2] r8169: Fix sleeping function called during get_stats64 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net 1/1] r8169: fix sleepable allocation during netdevice stats retrieval.
On 09/09/2015 05:55 PM, Corinna Vinschen wrote: > On Sep 9 17:54, Corinna Vinschen wrote: >> On Sep 9 17:24, poma wrote: >>> [PATCH net] r8169: Fix sleeping function called during get_stats64 >>> http://marc.info/?l=linux-netdev=144180123410135=raw >>> - the noise is still present >> >> Are you really sure? The entire dma_alloc/dma_free stuff has been moved >> away. There's no locking or sleeping involved different from what was >> there before my original patch when calling .ndo_get_stats64. >> It is literally the kernel ring buffer output, so I really can not understand your question. >> How would I be able to reproduce this on the command line? > This I have already written, here's once more for you, This noise is induced via userspace, xfce4-netload-plugin, http://goodies.xfce.org/projects/panel-plugins/xfce4-netload-plugin $ grep -i device .config/xfce4/panel/netload-16.rc Network_Device=enp3s0 $ ethtool -i enp3s0 | grep driver driver: r8169 Therefore, to try to reproduce this issue, 'xfce4-netload-plugin' must run within 'xfce4-panel', moreover 'xfce4-netload-plugin' must be configured to monitor affected network interface. No command line this time, hombre. If you are eager to test it, https://kojipkgs.fedoraproject.org/work/tasks/170/11000170/Fedora-Live-Xfce-x86_64-rawhide-20150908.iso > It would also be interesting to see the "noise" as it looks after > applying the above patch... > > > Corinna > The "noise" after applying "r8169: Fix sleeping function called during get_stats64": [ 215.048821] === [ 215.048826] [ INFO: suspicious RCU usage. ] [ 215.048834] 4.3.0-0.rc0.git9.1.fc24.x86_64 #1 Not tainted [ 215.048838] --- [ 215.048844] include/linux/rcupdate.h:579 Illegal context switch in RCU read-side critical section! [ 215.048849] other info that might help us debug this: [ 215.048858] rcu_scheduler_active = 1, debug_locks = 0 [ 215.048865] 3 locks held by panel-16-netloa/2546: [ 215.048869] #0: (>f_pos_lock){+.+.+.}, at: [] __fdget_pos+0x49/0x50 [ 215.048893] #1: (>lock){+.+.+.}, at: [] seq_read+0x4c/0x3e0 [ 215.048986] #2: (rcu_read_lock){..}, at: [] dev_seq_start+0x5/0x140 [ 215.049008] stack backtrace: [ 215.049020] CPU: 3 PID: 2546 Comm: panel-16-netloa Not tainted 4.3.0-0.rc0.git9.1.fc24.x86_64 #1 ... [ 215.049067] Call Trace: [ 215.049078] [] dump_stack+0x4b/0x63 [ 215.049090] [] lockdep_rcu_suspicious+0xd7/0x110 [ 215.049099] [] ___might_sleep+0xa7/0x230 [ 215.049107] [] __might_sleep+0x49/0x80 [ 215.049121] [] __alloc_pages_nodemask+0x2fe/0xb90 [ 215.049130] [] ? debug_lockdep_rcu_enabled+0x1d/0x20 [ 215.049141] [] ? sched_clock+0x9/0x10 [ 215.049149] [] ? local_clock+0x1c/0x20 [ 215.049157] [] ? debug_lockdep_rcu_enabled+0x1d/0x20 [ 215.049168] [] dma_generic_alloc_coherent+0x96/0x130 [ 215.049178] [] x86_swiotlb_alloc_coherent+0x25/0x50 [ 215.049193] [] dma_alloc_attrs+0x6d/0xe0 [ 215.049208] [] rtl8169_map_counters+0x3e/0x70 [r8169] [ 215.049221] [] rtl8169_update_counters+0x64/0x140 [r8169] [ 215.049233] [] rtl8169_get_stats64+0xbf/0x130 [r8169] [ 215.049243] [] dev_get_stats+0x54/0x100 [ 215.049251] [] dev_seq_printf_stats+0x37/0x120 [ 215.049262] [] dev_seq_show+0x14/0x30 [ 215.049270] [] seq_read+0x2fa/0x3e0 [ 215.049281] [] proc_reg_read+0x42/0x70 [ 215.049289] [] __vfs_read+0x37/0x100 [ 215.049299] [] ? security_file_permission+0xa3/0xc0 [ 215.049311] [] vfs_read+0x86/0x130 [ 215.049318] [] SyS_read+0x58/0xd0 [ 215.049327] [] entry_SYSCALL_64_fastpath+0x12/0x76 [ 215.049337] BUG: sleeping function called from invalid context at mm/page_alloc.c:3186 [ 215.049343] in_atomic(): 1, irqs_disabled(): 0, pid: 2546, name: panel-16-netloa [ 215.049348] INFO: lockdep is turned off. [ 215.049355] CPU: 3 PID: 2546 Comm: panel-16-netloa Not tainted 4.3.0-0.rc0.git9.1.fc24.x86_64 #1 ... [ 215.049403] Call Trace: [ 215.049412] [] dump_stack+0x4b/0x63 [ 215.049421] [] ___might_sleep+0x179/0x230 [ 215.049429] [] __might_sleep+0x49/0x80 [ 215.049437] [] __alloc_pages_nodemask+0x2fe/0xb90 [ 215.049448] [] ? debug_lockdep_rcu_enabled+0x1d/0x20 [ 215.049456] [] ? sched_clock+0x9/0x10 [ 215.049464] [] ? local_clock+0x1c/0x20 [ 215.049472] [] ? debug_lockdep_rcu_enabled+0x1d/0x20 [ 215.049483] [] dma_generic_alloc_coherent+0x96/0x130 [ 215.049492] [] x86_swiotlb_alloc_coherent+0x25/0x50 [ 215.049502] [] dma_alloc_attrs+0x6d/0xe0 [ 215.049522] [] rtl8169_map_counters+0x3e/0x70 [r8169] [ 215.049534] [] rtl8169_update_counters+0x64/0x140 [r8169] [ 215.049546] [] rtl8169_get_stats64+0xbf/0x130 [r8169] [ 215.049555] [] dev_get_stats+0x54/0x100 [ 215.049564] [] dev_seq_printf_stats+0x37/0x120 [ 215.049576] [] dev_seq_sho
Re: [PATCH net 1/1] r8169: fix sleepable allocation during netdevice stats retrieval.
2nd batch: 0001-r8169-decouple-the-counters-data-and-the-device-priv.patch 0002-r8169-use-a-single-condition-to-check-the-completion.patch 0003-r8169-increase-the-lifespan-of-the-hardware-counters.patch - the noise is still present -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net 1/1] r8169: fix sleepable allocation during netdevice stats retrieval.
On 06.09.2015 12:19, Corinna Vinschen wrote: > On Sep 4 22:59, Francois Romieu wrote: >> net/core/net-sysfs.c::netstat_show fetches statistics under dev_base_lock. >> >> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=104031 >> Fixes: 6e85d5ad36a2 ("r8169: Add values missing in @get_stats64 from HW >> counters") >> Signed-off-by: Francois Romieu>> Cc: Corinna Vinschen >> --- >> >> Applies against davem's net as of f1ccbfce2fc787981d1182d09c1f6b67766783a8. >> >> drivers/net/ethernet/realtek/r8169.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/net/ethernet/realtek/r8169.c >> b/drivers/net/ethernet/realtek/r8169.c >> index 24dcbe6..56829ea 100644 >> --- a/drivers/net/ethernet/realtek/r8169.c >> +++ b/drivers/net/ethernet/realtek/r8169.c >> @@ -2200,7 +2200,7 @@ static struct rtl8169_counters >> *rtl8169_map_counters(struct net_device *dev, >> struct rtl8169_counters *counters; >> u32 cmd; >> >> -counters = dma_alloc_coherent(d, sizeof(*counters), paddr, GFP_KERNEL); >> +counters = dma_alloc_coherent(d, sizeof(*counters), paddr, GFP_ATOMIC); >> if (counters) { >> RTL_W32(CounterAddrHigh, (u64)*paddr >> 32); >> cmd = (u64)*paddr & DMA_BIT_MASK(32); >> -- >> 2.4.3 > > I'll have a look tomorrow what I'm back to work, but for the time > being, two questions. > > - The code worked for me in local testing without problem, so I'm rather > puzzled. How can I reproduce the problem? > > - I'm pretty new to this stuff, so I don't understand this: > > The dma_alloc_coherent(...,GFP_KERNEL) call is not new in the code, > it's there since at least 2010. It appears to work fine in the > context of @get_ethtool_stats. Why does this not work in the context > of @ndo_get_stats64? > > > Thanks, > Corinna > 1. Reverted to r8169.c?id=eb78139 - the noise is still present 2. Patches applied - Francois Romieu (3): r8169: decouple the counters data and the device private area. r8169: move rtl_reset_counters_cond before the hardware counters helpers. r8169: increase the lifespan of the hardware counters dump area. - the noise is still present $ modinfo -n r8169 /lib/modules/4.3.0-0.rc0.git7.1.fc24.x86_64/updates/r8169.ko This noise is induced via userspace, xfce4-netload-plugin, http://goodies.xfce.org/projects/panel-plugins/xfce4-netload-plugin $ grep -i device .config/xfce4/panel/netload-16.rc Network_Device=enp3s0 $ ethtool -i enp3s0 | grep driver driver: r8169 $ dmesg | grep panel-16-netloa | wc -l 237 $ dmesg ... [ 68.597764] bridge0: port 1(enp3s0) entered forwarding state [ 70.016291] === [ 70.016296] [ INFO: suspicious RCU usage. ] [ 70.016303] 4.3.0-0.rc0.git7.1.fc24.x86_64 #1 Not tainted [ 70.016308] --- [ 70.016314] include/linux/rcupdate.h:579 Illegal context switch in RCU read-side critical section! [ 70.016319] other info that might help us debug this: [ 70.016327] rcu_scheduler_active = 1, debug_locks = 0 [ 70.016334] 2 locks held by panel-16-netloa/1806: [ 70.016338] #0: (>lock){+.+.+.}, at: [] seq_read+0x4c/0x3e0 [ 70.016362] #1: (rcu_read_lock){..}, at: [] dev_seq_start+0x5/0x140 [ 70.016380] stack backtrace: [ 70.016390] CPU: 3 PID: 1806 Comm: panel-16-netloa Not tainted 4.3.0-0.rc0.git7.1.fc24.x86_64 #1 ... [ 70.016435] Call Trace: [ 70.016445] [] dump_stack+0x4b/0x63 [ 70.016456] [] lockdep_rcu_suspicious+0xd7/0x110 [ 70.016465] [] ___might_sleep+0xa7/0x230 [ 70.016472] [] __might_sleep+0x49/0x80 [ 70.016481] [] __alloc_pages_nodemask+0x2fe/0xb90 [ 70.016490] [] ? debug_lockdep_rcu_enabled+0x1d/0x20 [ 70.016499] [] ? sched_clock+0x9/0x10 [ 70.016507] [] ? local_clock+0x1c/0x20 [ 70.016514] [] ? debug_lockdep_rcu_enabled+0x1d/0x20 [ 70.016524] [] dma_generic_alloc_coherent+0x96/0x130 [ 70.016534] [] x86_swiotlb_alloc_coherent+0x25/0x50 [ 70.016541] [] dma_alloc_attrs+0x6d/0xe0 [ 70.016555] [] rtl8169_map_counters+0x3e/0x70 [r8169] [ 70.016567] [] rtl8169_update_counters+0x64/0x140 [r8169] [ 70.016578] [] rtl8169_get_stats64+0xbf/0x130 [r8169] [ 70.016587] [] dev_get_stats+0x54/0x100 [ 70.016595] [] dev_seq_printf_stats+0x37/0x120 [ 70.016605] [] dev_seq_show+0x14/0x30 [ 70.016611] [] seq_read+0x2fa/0x3e0 [ 70.016621] [] proc_reg_read+0x42/0x70 [ 70.016628] [] __vfs_read+0x37/0x100 [ 70.016637] [] ? security_file_permission+0xa3/0xc0 [ 70.016644] [] vfs_read+0x86/0x130 [ 70.016652] [] SyS_read+0x58/0xd0 [ 70.016660] [] entry_SYSCALL_64_fastpath+0x12/0x76 [ 70.016698] BUG: sleeping function called from invalid context at mm/page_alloc.c:3186 [ 70.016704] in_atomic(): 1, irqs_disabled(): 0, pid: 1806, name: panel-16-netloa [ 70.016708] INFO: lockdep is turned off. [ 70.016715] CPU: 3 PID: 1806 Comm:
Re: [PATCH net 1/1] r8169: fix sleepable allocation during netdevice stats retrieval.
On 07.09.2015 10:50, Corinna Vinschen wrote: > On Sep 7 09:13, poma wrote: >> On 06.09.2015 12:19, Corinna Vinschen wrote: >>> On Sep 4 22:59, Francois Romieu wrote: >>>> Applies against davem's net as of >>>> f1ccbfce2fc787981d1182d09c1f6b67766783a8. >>>> >>>> drivers/net/ethernet/realtek/r8169.c | 2 +- >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/drivers/net/ethernet/realtek/r8169.c >>>> b/drivers/net/ethernet/realtek/r8169.c >>>> index 24dcbe6..56829ea 100644 >>>> --- a/drivers/net/ethernet/realtek/r8169.c >>>> +++ b/drivers/net/ethernet/realtek/r8169.c >>>> @@ -2200,7 +2200,7 @@ static struct rtl8169_counters >>>> *rtl8169_map_counters(struct net_device *dev, >>>>struct rtl8169_counters *counters; >>>>u32 cmd; >>>> >>>> - counters = dma_alloc_coherent(d, sizeof(*counters), paddr, GFP_KERNEL); >>>> + counters = dma_alloc_coherent(d, sizeof(*counters), paddr, GFP_ATOMIC); >>>>if (counters) { >>>>RTL_W32(CounterAddrHigh, (u64)*paddr >> 32); >>>>cmd = (u64)*paddr & DMA_BIT_MASK(32); >>>> -- >>>> 2.4.3 >>> [...] >> 1. Reverted to r8169.c?id=eb78139 >>- the noise is still present >> 2. Patches applied - Francois Romieu (3): >>r8169: decouple the counters data and the device private area. >>r8169: move rtl_reset_counters_cond before the hardware counters helpers. >>r8169: increase the lifespan of the hardware counters dump area. >>- the noise is still present > > Sure you tested the right code? I'm just asking because... > >> [ 70.016445] [] dump_stack+0x4b/0x63 >> [ 70.016456] [] lockdep_rcu_suspicious+0xd7/0x110 >> [ 70.016465] [] ___might_sleep+0xa7/0x230 >> [ 70.016472] [] __might_sleep+0x49/0x80 >> [ 70.016481] [] __alloc_pages_nodemask+0x2fe/0xb90 >> [ 70.016490] [] ? debug_lockdep_rcu_enabled+0x1d/0x20 >> [ 70.016499] [] ? sched_clock+0x9/0x10 >> [ 70.016507] [] ? local_clock+0x1c/0x20 >> [ 70.016514] [] ? debug_lockdep_rcu_enabled+0x1d/0x20 >> [ 70.016524] [] dma_generic_alloc_coherent+0x96/0x130 >> [ 70.016534] [] x86_swiotlb_alloc_coherent+0x25/0x50 >> [ 70.016541] [] dma_alloc_attrs+0x6d/0xe0 >> [ 70.016555] [] rtl8169_map_counters+0x3e/0x70 [r8169] > > ...rtl8169_map_counters only exists before Francois patch. The patch > removes this function. > > > Corinna > I do not know, is this OK? $ rpm -i https://kojipkgs.fedoraproject.org/packages/kernel/4.3.0/0.rc0.git7.1.fc24/src/kernel-4.3.0-0.rc0.git7.1.fc24.src.rpm $ rpmbuild -bp rpmbuild/SPECS/kernel.spec $ cd rpmbuild/BUILD/kernel-4.2.fc24/linux-4.3.0-0.rc0.git7.1.fc24.x86_64/ $ curl -s "http://marc.info/?l=linux-netdev=144145559429943=raw; | patch -p1 patching file drivers/net/ethernet/realtek/r8169.c patch unexpectedly ends in middle of line $ curl -s "http://marc.info/?l=linux-netdev=144145559729944=raw; | patch -p1 patching file drivers/net/ethernet/realtek/r8169.c patch unexpectedly ends in middle of line $ curl -s "http://marc.info/?l=linux-netdev=144145558929942=raw; | patch -p1 patching file drivers/net/ethernet/realtek/r8169.c patch unexpectedly ends in middle of line $ sed -i 's/PATCHLEVEL = 2/PATCHLEVEL = 3/' Makefile $ sed -i 's/EXTRAVERSION =/EXTRAVERSION = -0.rc0.git7.1.fc24.x86_64/' Makefile $ make -j drivers/net/ethernet/realtek/r8169.ko $ su # cp drivers/net/ethernet/realtek/r8169.ko /usr/lib/modules/4.3.0-0.rc0.git7.1.fc24.x86_64/updates/ # depmod # dracut -f --kver 4.3.0-0.rc0.git7.1.fc24.x86_64 # lsinitrd --kver 4.3.0-0.rc0.git7.1.fc24.x86_64 | grep r8169 ... usr/lib/modules/4.3.0-0.rc0.git7.1.fc24.x86_64/updates/r8169.ko # systemctl reboot -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
BUG: sleeping function called from invalid context at mm/page_alloc.c:3186
Call Trace: [] dump_stack+0x4b/0x63 [] ___might_sleep+0x179/0x230 [] __might_sleep+0x49/0x80 [] __alloc_pages_nodemask+0x2fe/0xb90 [] ? debug_object_activate+0xb6/0x1e0 [] ? debug_object_active_state+0x91/0x150 [] dma_generic_alloc_coherent+0x96/0x130 [] x86_swiotlb_alloc_coherent+0x25/0x50 [] dma_alloc_attrs+0x6d/0xe0 [] rtl8169_map_counters+0x3e/0x70 [r8169] [] rtl8169_update_counters+0x64/0x140 [r8169] [] rtl8169_get_stats64+0xbf/0x130 [r8169] [] dev_get_stats+0x54/0x100 [] dev_seq_printf_stats+0x37/0x120 [] dev_seq_show+0x14/0x30 [] seq_read+0x2fa/0x3e0 [] proc_reg_read+0x42/0x70 [] __vfs_read+0x37/0x100 [] ? security_file_permission+0xa3/0xc0 [] vfs_read+0x86/0x130 [] SyS_read+0x58/0xd0 [] entry_SYSCALL_64_fastpath+0x12/0x76 https://bugzilla.kernel.org/show_bug.cgi?id=104031 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html