-
Notifications
You must be signed in to change notification settings - Fork 57.6k
update #235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
update #235
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0day-ci
pushed a commit
to 0day-ci/linux
that referenced
this pull request
Jun 10, 2016
Frank Kellermann reported a kernel crash with 4.5.0 when IPv6 is disabled at boot using the kernel option ipv6.disable=1. Using current net-next with the boot option: $ ip link add red type vrf table 1001 Generates: [12210.919584] BUG: unable to handle kernel NULL pointer dereference at 0000000000000748 [12210.921341] IP: [<ffffffff814b30e3>] fib6_get_table+0x2c/0x5a [12210.922537] PGD b79e3067 PUD bb32b067 PMD 0 [12210.923479] Oops: 0000 [#1] SMP [12210.924001] Modules linked in: ipvlan 8021q garp mrp stp llc [12210.925130] CPU: 3 PID: 1177 Comm: ip Not tainted 4.7.0-rc1+ torvalds#235 [12210.926168] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014 [12210.928065] task: ffff8800b9ac4640 ti: ffff8800bacac000 task.ti: ffff8800bacac000 [12210.929328] RIP: 0010:[<ffffffff814b30e3>] [<ffffffff814b30e3>] fib6_get_table+0x2c/0x5a [12210.930697] RSP: 0018:ffff8800bacaf888 EFLAGS: 00010202 [12210.931563] RAX: 0000000000000748 RBX: ffffffff81a9e280 RCX: ffff8800b9ac4e28 [12210.932688] RDX: 00000000000000e9 RSI: 0000000000000002 RDI: 0000000000000286 [12210.933820] RBP: ffff8800bacaf898 R08: ffff8800b9ac4df0 R09: 000000000052001b [12210.934941] R10: 00000000657c0000 R11: 000000000000c649 R12: 00000000000003e9 [12210.936032] R13: 00000000000003e9 R14: ffff8800bace7800 R15: ffff8800bb3ec000 [12210.937103] FS: 00007faa1766c700(0000) GS:ffff88013ac00000(0000) knlGS:0000000000000000 [12210.938321] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [12210.939166] CR2: 0000000000000748 CR3: 00000000b79d6000 CR4: 00000000000406e0 [12210.940278] Stack: [12210.940603] ffff8800bb3ec000 ffffffff81a9e280 ffff8800bacaf8c8 ffffffff814b3135 [12210.941818] ffff8800bb3ec000 ffffffff81a9e280 ffffffff81a9e280 ffff8800bace7800 [12210.943040] ffff8800bacaf8f0 ffffffff81397c88 ffff8800bb3ec000 ffffffff81a9e280 [12210.944288] Call Trace: [12210.944688] [<ffffffff814b3135>] fib6_new_table+0x24/0x8a [12210.945516] [<ffffffff81397c88>] vrf_dev_init+0xd4/0x162 [12210.946328] [<ffffffff814091e1>] register_netdevice+0x100/0x396 [12210.947209] [<ffffffff8139823d>] vrf_newlink+0x40/0xb3 [12210.948001] [<ffffffff814187f0>] rtnl_newlink+0x5d3/0x6d5 ... The problem above is due to the fact that the fib hash table is not allocated when IPv6 is disabled at boot. As for the VRF driver it should not do any IPv6 initializations if IPv6 is disabled, so it needs to know if IPv6 is disabled at boot. The disable parameter is private to the IPv6 module, so provide an accessor for modules to determine if IPv6 was disabled at boot time. Fixes: 35402e3 ("net: Add IPv6 support to VRF device") Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
fengguang
pushed a commit
to 0day-ci/linux
that referenced
this pull request
Mar 31, 2017
On Wed, 29 Mar 2017 21:11:44 +0200 Jesper Dangaard Brouer <brouer@redhat.com> wrote: > On Wed, 29 Mar 2017 11:12:26 -0700 Matthew Wilcox <willy@infradead.org> wrote: > > > On Wed, Mar 29, 2017 at 11:19:49AM +0200, Peter Zijlstra wrote: > > > On Wed, Mar 29, 2017 at 10:59:28AM +0200, Jesper Dangaard Brouer wrote: > > > > On Wed, 29 Mar 2017 10:12:19 +0200 > > > > Peter Zijlstra <peterz@infradead.org> wrote: > > > > > No, that's horrible. Also, wth is this about? A memory allocator that > > > > > needs in_nmi()? That sounds beyond broken. > > > > > > > > It is the other way around. We want to exclude NMI and HARDIRQ from > > > > using the per-cpu-pages (pcp) lists "order-0 cache" (they will > > > > fall-through using the normal buddy allocator path). > > > > > > Any in_nmi() code arriving at the allocator is broken. No need to fix > > > the allocator. > > > > That's demonstrably true. You can't grab a spinlock in NMI code and > > the first thing that happens if this in_irq_or_nmi() check fails is ... > > spin_lock_irqsave(&zone->lock, flags); > > so this patch should just use in_irq(). > > > > (the concept of NMI code needing to allocate memory was blowing my mind > > a little bit) > > Regardless or using in_irq() (or in combi with in_nmi()) I get the > following warning below: > > [ 0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-4.11.0-rc3-net-next-page-alloc-softirq+ root=UUID=2e8451ff-6797-49b5-8d3a-eed5a42d7dc9 ro rhgb quiet LANG=en_DK.UTF > -8 > [ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes) > [ 0.000000] ------------[ cut here ]------------ > [ 0.000000] WARNING: CPU: 0 PID: 0 at kernel/softirq.c:161 __local_bh_enable_ip+0x70/0x90 > [ 0.000000] Modules linked in: > [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.11.0-rc3-net-next-page-alloc-softirq+ torvalds#235 > [ 0.000000] Hardware name: MSI MS-7984/Z170A GAMING PRO (MS-7984), BIOS 1.60 12/16/2015 > [ 0.000000] Call Trace: > [ 0.000000] dump_stack+0x4f/0x73 > [ 0.000000] __warn+0xcb/0xf0 > [ 0.000000] warn_slowpath_null+0x1d/0x20 > [ 0.000000] __local_bh_enable_ip+0x70/0x90 > [ 0.000000] free_hot_cold_page+0x1a4/0x2f0 > [ 0.000000] __free_pages+0x1f/0x30 > [ 0.000000] __free_pages_bootmem+0xab/0xb8 > [ 0.000000] __free_memory_core+0x79/0x91 > [ 0.000000] free_all_bootmem+0xaa/0x122 > [ 0.000000] mem_init+0x71/0xa4 > [ 0.000000] start_kernel+0x1e5/0x3f1 > [ 0.000000] x86_64_start_reservations+0x2a/0x2c > [ 0.000000] x86_64_start_kernel+0x178/0x18b > [ 0.000000] start_cpu+0x14/0x14 > [ 0.000000] ? start_cpu+0x14/0x14 > [ 0.000000] ---[ end trace a57944bec8fc985c ]--- > [ 0.000000] Memory: 32739472K/33439416K available (7624K kernel code, 1528K rwdata, 3168K rodata, 1860K init, 2260K bss, 699944K reserved, 0K cma-reserved) > > And kernel/softirq.c:161 contains: > > WARN_ON_ONCE(in_irq() || irqs_disabled()); > > Thus, I don't think the change in my RFC-patch[1] is safe. > Of changing[2] to support softirq allocations by replacing > preempt_disable() with local_bh_disable(). > > [1] http://lkml.kernel.org/r/20170327143947.4c237e54@redhat.com > > [2] commit 374ad05 ("mm, page_alloc: only use per-cpu allocator for irq-safe requests") > https://git.kernel.org/torvalds/c/374ad05ab64d A patch that avoids the above warning is inlined below, but I'm not sure if this is best direction. Or we should rather consider reverting part of commit 374ad05 to avoid the softirq performance regression? [PATCH] mm, page_alloc: re-enable softirq use of per-cpu page allocator From: Jesper Dangaard Brouer <brouer@redhat.com> IRQ context were excluded from using the Per-Cpu-Pages (PCP) lists caching of order-0 pages in commit 374ad05 ("mm, page_alloc: only use per-cpu allocator for irq-safe requests"). This unfortunately also included excluded SoftIRQ. This hurt the performance for the use-case of refilling DMA RX rings in softirq context. This patch re-allow softirq context, which should be safe by disabling BH/softirq, while accessing the list. PCP-lists access from both hard-IRQ and NMI context must not be allowed. Peter Zijlstra says in_nmi() code never access the page allocator, thus it should be sufficient to only test for !in_irq(). One concern with this change is adding a BH (enable) scheduling point at both PCP alloc and free. Fixes: 374ad05 ("mm, page_alloc: only use per-cpu allocator for irq-safe requests") Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
fengguang
pushed a commit
to 0day-ci/linux
that referenced
this pull request
Mar 27, 2020
Add various tests to make sure the verifier keeps catching them: # ./test_verifier [...] torvalds#230/p pass ctx or null check, 1: ctx OK torvalds#231/p pass ctx or null check, 2: null OK torvalds#232/p pass ctx or null check, 3: 1 OK torvalds#233/p pass ctx or null check, 4: ctx - const OK torvalds#234/p pass ctx or null check, 5: null (connect) OK torvalds#235/p pass ctx or null check, 6: null (bind) OK torvalds#236/p pass ctx or null check, 7: ctx (bind) OK torvalds#237/p pass ctx or null check, 8: null (bind) OK [...] Summary: 1595 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
joestringer
pushed a commit
to joestringer/linux
that referenced
this pull request
Mar 28, 2020
Add various tests to make sure the verifier keeps catching them: # ./test_verifier [...] torvalds#230/p pass ctx or null check, 1: ctx OK torvalds#231/p pass ctx or null check, 2: null OK torvalds#232/p pass ctx or null check, 3: 1 OK torvalds#233/p pass ctx or null check, 4: ctx - const OK torvalds#234/p pass ctx or null check, 5: null (connect) OK torvalds#235/p pass ctx or null check, 6: null (bind) OK torvalds#236/p pass ctx or null check, 7: ctx (bind) OK torvalds#237/p pass ctx or null check, 8: null (bind) OK [...] Summary: 1595 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/c74758d07b1b678036465ef7f068a49e9efd3548.1585323121.git.daniel@iogearbox.net
akiernan
pushed a commit
to zuma-array/linux
that referenced
this pull request
Nov 4, 2022
PD#151229: driver defect clean up torvalds#235 torvalds#236 Change-Id: I59acc448a4ece1f385d0b6d602721d34ce60e02c Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
kuba-moo
pushed a commit
to linux-netdev/testing
that referenced
this pull request
Apr 15, 2025
…g semicolon) Fix checkpatch code style warnings: WARNING: macros should not use a trailing semicolon torvalds#180: FILE: net/core/pktgen.c:180: +#define func_enter() pr_debug("entering %s\n", __func__); WARNING: macros should not use a trailing semicolon torvalds#234: FILE: net/core/pktgen.c:234: +#define if_lock(t) mutex_lock(&(t->if_lock)); CHECK: Unnecessary parentheses around t->if_lock torvalds#235: FILE: net/core/pktgen.c:235: +#define if_unlock(t) mutex_unlock(&(t->if_lock)); Signed-off-by: Peter Seiderer <ps.report@gmx.net> Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Mina-Chou
pushed a commit
to andestech/linux
that referenced
this pull request
Jun 2, 2025
…ds#235) Signed-off-by: Locus Wei-Han Chen <locus84@andestech.com> Reviewed-on: https://gitea.andestech.com/RD-SW/linux/pulls/235 Reviewed-by: randolph <randolph@andestech.com> Reviewed-by: Charles Ci-Jyun Wu <dminus@andestech.com> Reviewed-by: Tim Shih-Ting OuYang <tim609@andestech.com> Co-authored-by: Locus Wei-Han Chen <locus84@andestech.com> Co-committed-by: Locus Wei-Han Chen <locus84@andestech.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.