forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 113
fix bug #24
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
YafengGao777
wants to merge
2
commits into
STMicroelectronics:v6.1-stm32mp
from
YafengGao777:v6.1-stm32mp
Closed
fix bug #24
YafengGao777
wants to merge
2
commits into
STMicroelectronics:v6.1-stm32mp
from
YafengGao777:v6.1-stm32mp
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
Isn't this a bug, or is it because it won't affect |
Thanks for your contribution. For me this is a bug and I have entered an internal ticket for that. |
This pull request has been refused, the Contribution License Agreement must be signed. |
What has happened |
Your patch was integrated in latest release (V5.1.0 ecosystem release). |
arnopo
pushed a commit
to arnopo/linux
that referenced
this pull request
Nov 29, 2024
scx_ops_bypass() can currently race on the ops enable / disable path as follows: 1. scx_ops_bypass(true) called on enable path, bypass depth is set to 1 2. An op on the init path exits, which schedules scx_ops_disable_workfn() 3. scx_ops_bypass(false) is called on the disable path, and bypass depth is decremented to 0 4. kthread is scheduled to execute scx_ops_disable_workfn() 5. scx_ops_bypass(true) called, bypass depth set to 1 6. scx_ops_bypass() races when iterating over CPUs While it's not safe to take any blocking locks on the bypass path, it is safe to take a raw spinlock which cannot be preempted. This patch therefore updates scx_ops_bypass() to use a raw spinlock to synchronize, and changes scx_ops_bypass_depth to be a regular int. Without this change, we observe the following warnings when running the 'exit' sched_ext selftest (sometimes requires a couple of runs): .[root@virtme-ng sched_ext]# ./runner -t exit ===== START ===== TEST: exit ... [ 14.935078] WARNING: CPU: 2 PID: 360 at kernel/sched/ext.c:4332 scx_ops_bypass+0x1ca/0x280 [ 14.935126] Modules linked in: [ 14.935150] CPU: 2 UID: 0 PID: 360 Comm: sched_ext_ops_h Not tainted 6.11.0-virtme STMicroelectronics#24 [ 14.935192] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Arch Linux 1.16.3-1-1 04/01/2014 [ 14.935242] Sched_ext: exit (enabling+all) [ 14.935244] RIP: 0010:scx_ops_bypass+0x1ca/0x280 [ 14.935300] Code: ff ff ff e8 48 96 10 00 fb e9 08 ff ff ff c6 05 7b 34 e8 01 01 90 48 c7 c7 89 86 88 87 e8 be 1d f8 ff 90 0f 0b 90 90 eb 95 90 <0f> 0b 90 41 8b 84 24 24 0a 00 00 eb 97 90 0f 0b 90 41 8b 84 24 24 [ 14.935394] RSP: 0018:ffffb706c0957ce0 EFLAGS: 00010002 [ 14.935424] RAX: 0000000000000009 RBX: 0000000000000001 RCX: 00000000e3fb8b2a [ 14.935465] RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffffff88a4c080 [ 14.935512] RBP: 0000000000009b56 R08: 0000000000000004 R09: 00000003f12e520a [ 14.935555] R10: ffffffff863a9795 R11: 0000000000000000 R12: ffff8fc5fec31300 [ 14.935598] R13: ffff8fc5fec31318 R14: 0000000000000286 R15: 0000000000000018 [ 14.935642] FS: 0000000000000000(0000) GS:ffff8fc5fe680000(0000) knlGS:0000000000000000 [ 14.935684] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 14.935721] CR2: 0000557d92890b88 CR3: 000000002464a000 CR4: 0000000000750ef0 [ 14.935765] PKRU: 55555554 [ 14.935782] Call Trace: [ 14.935802] <TASK> [ 14.935823] ? __warn+0xce/0x220 [ 14.935850] ? scx_ops_bypass+0x1ca/0x280 [ 14.935881] ? report_bug+0xc1/0x160 [ 14.935909] ? handle_bug+0x61/0x90 [ 14.935934] ? exc_invalid_op+0x1a/0x50 [ 14.935959] ? asm_exc_invalid_op+0x1a/0x20 [ 14.935984] ? raw_spin_rq_lock_nested+0x15/0x30 [ 14.936019] ? scx_ops_bypass+0x1ca/0x280 [ 14.936046] ? srso_alias_return_thunk+0x5/0xfbef5 [ 14.936081] ? __pfx_scx_ops_disable_workfn+0x10/0x10 [ 14.936111] scx_ops_disable_workfn+0x146/0xac0 [ 14.936142] ? finish_task_switch+0xa9/0x2c0 [ 14.936172] ? srso_alias_return_thunk+0x5/0xfbef5 [ 14.936211] ? __pfx_scx_ops_disable_workfn+0x10/0x10 [ 14.936244] kthread_worker_fn+0x101/0x2c0 [ 14.936268] ? __pfx_kthread_worker_fn+0x10/0x10 [ 14.936299] kthread+0xec/0x110 [ 14.936327] ? __pfx_kthread+0x10/0x10 [ 14.936351] ret_from_fork+0x37/0x50 [ 14.936374] ? __pfx_kthread+0x10/0x10 [ 14.936400] ret_from_fork_asm+0x1a/0x30 [ 14.936427] </TASK> [ 14.936443] irq event stamp: 21002 [ 14.936467] hardirqs last enabled at (21001): [<ffffffff863aa35f>] resched_cpu+0x9f/0xd0 [ 14.936521] hardirqs last disabled at (21002): [<ffffffff863dd0ba>] scx_ops_bypass+0x11a/0x280 [ 14.936571] softirqs last enabled at (20642): [<ffffffff863683d7>] __irq_exit_rcu+0x67/0xd0 [ 14.936622] softirqs last disabled at (20637): [<ffffffff863683d7>] __irq_exit_rcu+0x67/0xd0 [ 14.936672] ---[ end trace 0000000000000000 ]--- [ 14.953282] sched_ext: BPF scheduler "exit" disabled (unregistered from BPF) [ 14.953352] ------------[ cut here ]------------ [ 14.953383] WARNING: CPU: 2 PID: 360 at kernel/sched/ext.c:4335 scx_ops_bypass+0x1d8/0x280 [ 14.953428] Modules linked in: [ 14.953453] CPU: 2 UID: 0 PID: 360 Comm: sched_ext_ops_h Tainted: G W 6.11.0-virtme STMicroelectronics#24 [ 14.953505] Tainted: [W]=WARN [ 14.953527] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Arch Linux 1.16.3-1-1 04/01/2014 [ 14.953574] RIP: 0010:scx_ops_bypass+0x1d8/0x280 [ 14.953603] Code: c6 05 7b 34 e8 01 01 90 48 c7 c7 89 86 88 87 e8 be 1d f8 ff 90 0f 0b 90 90 eb 95 90 0f 0b 90 41 8b 84 24 24 0a 00 00 eb 97 90 <0f> 0b 90 41 8b 84 24 24 0a 00 00 eb 92 f3 0f 1e fa 49 8d 84 24 f0 [ 14.953693] RSP: 0018:ffffb706c0957ce0 EFLAGS: 00010046 [ 14.953722] RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000001 [ 14.953763] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8fc5fec31318 [ 14.953804] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 [ 14.953845] R10: ffffffff863a9795 R11: 0000000000000000 R12: ffff8fc5fec31300 [ 14.953888] R13: ffff8fc5fec31318 R14: 0000000000000286 R15: 0000000000000018 [ 14.953934] FS: 0000000000000000(0000) GS:ffff8fc5fe680000(0000) knlGS:0000000000000000 [ 14.953974] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 14.954009] CR2: 0000557d92890b88 CR3: 000000002464a000 CR4: 0000000000750ef0 [ 14.954052] PKRU: 55555554 [ 14.954068] Call Trace: [ 14.954085] <TASK> [ 14.954102] ? __warn+0xce/0x220 [ 14.954126] ? scx_ops_bypass+0x1d8/0x280 [ 14.954150] ? report_bug+0xc1/0x160 [ 14.954178] ? handle_bug+0x61/0x90 [ 14.954203] ? exc_invalid_op+0x1a/0x50 [ 14.954226] ? asm_exc_invalid_op+0x1a/0x20 [ 14.954250] ? raw_spin_rq_lock_nested+0x15/0x30 [ 14.954285] ? scx_ops_bypass+0x1d8/0x280 [ 14.954311] ? __mutex_unlock_slowpath+0x3a/0x260 [ 14.954343] scx_ops_disable_workfn+0xa3e/0xac0 [ 14.954381] ? __pfx_scx_ops_disable_workfn+0x10/0x10 [ 14.954413] kthread_worker_fn+0x101/0x2c0 [ 14.954442] ? __pfx_kthread_worker_fn+0x10/0x10 [ 14.954479] kthread+0xec/0x110 [ 14.954507] ? __pfx_kthread+0x10/0x10 [ 14.954530] ret_from_fork+0x37/0x50 [ 14.954553] ? __pfx_kthread+0x10/0x10 [ 14.954576] ret_from_fork_asm+0x1a/0x30 [ 14.954603] </TASK> [ 14.954621] irq event stamp: 21002 [ 14.954644] hardirqs last enabled at (21001): [<ffffffff863aa35f>] resched_cpu+0x9f/0xd0 [ 14.954686] hardirqs last disabled at (21002): [<ffffffff863dd0ba>] scx_ops_bypass+0x11a/0x280 [ 14.954735] softirqs last enabled at (20642): [<ffffffff863683d7>] __irq_exit_rcu+0x67/0xd0 [ 14.954782] softirqs last disabled at (20637): [<ffffffff863683d7>] __irq_exit_rcu+0x67/0xd0 [ 14.954829] ---[ end trace 0000000000000000 ]--- [ 15.022283] sched_ext: BPF scheduler "exit" disabled (unregistered from BPF) [ 15.092282] sched_ext: BPF scheduler "exit" disabled (unregistered from BPF) [ 15.149282] sched_ext: BPF scheduler "exit" disabled (unregistered from BPF) ok 1 exit # ===== END ===== And with it, the test passes without issue after 1000s of runs: .[root@virtme-ng sched_ext]# ./runner -t exit ===== START ===== TEST: exit DESCRIPTION: Verify we can cleanly exit a scheduler in multiple places OUTPUT: [ 7.412856] sched_ext: BPF scheduler "exit" enabled [ 7.427924] sched_ext: BPF scheduler "exit" disabled (unregistered from BPF) [ 7.466677] sched_ext: BPF scheduler "exit" enabled [ 7.475923] sched_ext: BPF scheduler "exit" disabled (unregistered from BPF) [ 7.512803] sched_ext: BPF scheduler "exit" enabled [ 7.532924] sched_ext: BPF scheduler "exit" disabled (unregistered from BPF) [ 7.586809] sched_ext: BPF scheduler "exit" enabled [ 7.595926] sched_ext: BPF scheduler "exit" disabled (unregistered from BPF) [ 7.661923] sched_ext: BPF scheduler "exit" disabled (unregistered from BPF) [ 7.723923] sched_ext: BPF scheduler "exit" disabled (unregistered from BPF) ok 1 exit # ===== END ===== ============================= RESULTS: PASSED: 1 SKIPPED: 0 FAILED: 0 Fixes: f0e1a06 ("sched_ext: Implement BPF extensible scheduler class") Signed-off-by: David Vernet <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
fourmone
pushed a commit
that referenced
this pull request
Mar 14, 2025
When no interfaces setup in /etc/network/interfaces There is a crash at resume after power cycle: [ 20.288096] Internal error: Oops: 17 [#1] PREEMPT SMP ARM [ 20.292045] Modules linked in: [ 20.295179] CPU: 0 PID: 372 Comm: sh Not tainted 6.6.65-g9ebaa3bcaff1-dirty #24 [ 20.302430] Hardware name: STM32 (Device Tree Support) [ 20.307565] PC is at smsc_phy_config_init+0x38/0xd0 [ 20.312417] LR is at phy_init_hw+0x6c/0xa4 [ 20.316561] pc : [<c083c700>] lr : [<c082e424>] psr: 20050053 [ 20.322802] sp : ddd9ddd8 ip : 00000000 fp : c074d914 [ 20.328038] r10: c12d65d0 r9 : c41e0c44 r8 : c132a4c0 [ 20.333273] r7 : c0830908 r6 : 00000010 r5 : c0fa50cc r4 : c41e0c00 [ 20.339716] r3 : 00000000 r2 : 00008061 r1 : 00000003 r0 : c41e0c00 [ 20.346260] Flags: nzCv IRQs on FIQs off Mode SVC_32 ISA ARM Segment none [ 20.353508] Control: 10c5387d Table: c2f0006a DAC: 00000051 [ 20.359245] Register r0 information: slab kmalloc-1k start c41e0c00 pointer offset 0 size 1024 [ 20.367827] Register r1 information: non-paged memory [ 20.372868] Register r2 information: non-paged memory [ 20.377906] Register r3 information: NULL pointer [ 20.382643] Register r4 information: slab kmalloc-1k start c41e0c00 pointer offset 0 size 1024 [ 20.391216] Register r5 information: non-slab/vmalloc memory [ 20.396958] Register r6 information: zero-size pointer [ 20.401997] Register r7 information: non-slab/vmalloc memory [ 20.407738] Register r8 information: non-slab/vmalloc memory [ 20.413379] Register r9 information: slab kmalloc-1k start c41e0c00 pointer offset 68 size 1024 [ 20.422053] Register r10 information: non-slab/vmalloc memory [ 20.427795] Register r11 information: non-slab/vmalloc memory [ 20.433537] Register r12 information: NULL pointer [ 20.438274] Process sh (pid: 372, stack limit = 0xf0bdeaf6) [ 20.443918] Stack: (0xddd9ddd8 to 0xddd9e000) [ 20.448254] ddc0: c41e0c00 c0fa50cc [ 20.456409] dde0: 00000010 c082e424 c41e0c00 c0830950 c41e0c00 c0fa50cc 00000010 c074d494 [ 20.464563] de00: c41e0c00 00000000 00000000 00000010 c132a4c0 c074d64 c41e0c88 c12d65a4 [ 20.472818] de20: c41e0c00 c12d65d8 c132a4c0 c137ca38 c12d65d0 c074f480 00000010 c1346ba0 [ 20.480972] de40: c132a4c0 00000010 00000003 c134f684 c43f5780 c132a4c0 c1346a1c 00000000 [ 20.489127] de60: 00000000 c074fa58 00000000 c01756ec 00000003 7330b91d c134f6a8 00000000 [ 20.497282] de80: 00000003 c132a4c0 c134f6a8 00000004 c44560c0 c0c37108 00000003 00000003 [ 20.505436] dea0: c0f1b93c c017586c 00000003 c0174578 c44560c0 00000004 c23d4100 c23d4110 [ 20.513690] dec0: ddd9df28 00000000 00000000 c03498c8 00000000 00000000 00000004 c2ef16c0 [ 20.521844] dee0: ddd9df80 00089e60 c43f5780 00000000 00000000 c02bfca4 00000000 00000000 [ 20.529998] df00: 00000000 00000000 01000005 00000001 00000004 00089e60 00000000 00000000 [ 20.538152] df20: 00000001 00000000 c2ef16c0 00000000 00000000 00000000 00000000 00000000 [ 20.546406] df40: 00000000 00004004 00000000 00000000 00000000 7330b91d 00000004 c2ef16c0 [ 20.554561] df60: c2ef16c0 00000000 00000000 c01002c4 c43f5780 00000004 0008440 c02c0018 [ 20.562715] df80: 00000000 00000000 00000003 7330b91d 00000001 00000004 00089e60 00000001 [ 20.570869] dfa0: 00000004 c0100060 00000004 00089e60 00000001 00089e60 00000004 00000001 [ 20.579023] dfc0: 00000004 00089e60 00000001 00000004 00000000 00000020 00000000 0008440 [ 20.587277] dfe0: 00000004 beb55670 b6eab627 b6e285e6 60070030 00000001 00000000 00000000 [ 20.595439] smsc_phy_config_init from phy_init_hw+0x6c/0xa4 [ 20.601102] phy_init_hw from mdio_bus_phy_resume+0x48/0x144 [ 20.606761] mdio_bus_phy_resume from dpm_run_callback+0x48/0x160 [ 20.612824] dpm_run_callback from __device_resume+0x94/0x368 [ 20.618583] __device_resume from dpm_resume+0xb4/0x224 [ 20.623741] dpm_resume from dpm_resume_end+0xc/0x18 [ 20.628697] dpm_resume_end from suspend_devices_and_enter+0x1bc/0x2fc [ 20.635267] suspend_devices_and_enter from enter_state+0x200/0x244 [ 20.641530] enter_state from pm_suspend+0x40/0x98 [ 20.646282] pm_suspend from state_store+0x6c/0xc8 [ 20.651038] state_store from kernfs_fop_write_iter+0xfc/0x1e8 [ 20.656897] kernfs_fop_write_iter from vfs_write+0x21c/0x42c [ 20.662655] vfs_write from ksys_write+0x70/0xf0 [ 20.667305] ksys_write from ret_fast_syscall+0x0/0x54 [ 20.672355] Exception stack(0xddd9dfa8 to 0xddd9dff0) [ 20.677495] dfa0: 00000004 00089e60 00000001 00089e60 00000004 00000001 [ 20.685649] dfc0: 00000004 00089e60 00000001 00000004 00000000 00000020 00000000 0008440 [ 20.693801] dfe0: 00000004 beb55670 b6eab627 b6e285e6 [ 20.698842] Code: e8bd8070 e59433b4 e3082061 e3a01003 (e59331d0) [ 20.705107] ---[ end trace 0000000000000000 ]--- Signed-off-by: Christophe Roullier <[email protected]> Change-Id: I228731133b4600c845107005c48bb48cc15be47e Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/432259 ACI: CIBUILD <[email protected]>
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.
fix compatible="panel-dpi" node not have data-mapping will cause panic.