Qiuxu Zhuo
23fc8df26d
rcu/rcuscale: Stop kfree_scale_thread thread(s) after unloading rcuscale
Running the 'kfree_rcu_test' test case [1] results in a splat [2].
The root cause is the kfree_scale_thread thread(s) continue running
after unloading the rcuscale module. This commit fixes that isue by
invoking kfree_scale_cleanup() from rcu_scale_cleanup() when removing
the rcuscale module.
[1] modprobe rcuscale kfree_rcu_test=1
// After some time
rmmod rcuscale
rmmod torture
[2] BUG: unable to handle page fault for address: ffffffffc0601a87
#PF: supervisor instruction fetch in kernel mode
#PF: error_code(0x0010) - not-present page
PGD 11de4f067 P4D 11de4f067 PUD 11de51067 PMD 112f4d067 PTE 0
Oops: 0010 [#1] PREEMPT SMP NOPTI
CPU: 1 PID: 1798 Comm: kfree_scale_thr Not tainted 6.3.0-rc1-rcu+ #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015
RIP: 0010:0xffffffffc0601a87
Code: Unable to access opcode bytes at 0xffffffffc0601a5d.
RSP: 0018:ffffb25bc2e57e18 EFLAGS: 00010297
RAX: 0000000000000000 RBX: ffffffffc061f0b6 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff962fd0de RDI: ffffffff962fd0de
RBP: ffffb25bc2e57ea8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
R13: 0000000000000000 R14: 000000000000000a R15: 00000000001c1dbe
FS: 0000000000000000(0000) GS:ffff921fa2200000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffc0601a5d CR3: 000000011de4c006 CR4: 0000000000370ee0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
? kvfree_call_rcu+0xf0/0x3a0
? kthread+0xf3/0x120
? kthread_complete_and_exit+0x20/0x20
? ret_from_fork+0x1f/0x30
</TASK>
Modules linked in: rfkill sunrpc ... [last unloaded: torture]
CR2: ffffffffc0601a87
---[ end trace 0000000000000000 ]---
Fixes: e6e78b004f ("rcuperf: Add kfree_rcu() performance Tests")
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2023-05-11 13:48:50 -07:00
..
2023-04-29 10:05:22 -07:00
2023-04-29 10:05:22 -07:00
2023-04-27 12:07:50 -07:00
2022-12-02 11:25:00 +01:00
2023-04-29 10:29:57 -07:00
2023-04-16 14:23:07 +02:00
2023-04-28 14:41:53 -07:00
2023-01-01 11:15:05 -08:00
2022-12-21 14:31:52 -08:00
2023-04-15 10:17:16 +02:00
2023-04-27 19:42:02 -07:00
2023-04-28 14:53:30 -07:00
2023-05-11 13:46:36 -07:00
2023-05-02 20:33:36 -07:00
2023-05-03 12:01:05 -07:00
2023-04-27 19:42:02 -07:00
2023-05-11 13:48:50 -07:00
2023-04-28 15:03:43 -07:00
2023-04-29 10:24:30 -07:00
2023-05-05 13:11:02 -07:00
2022-11-30 16:13:18 -08:00
2022-08-22 18:50:06 -04:00
2022-04-25 14:37:28 +02:00
2022-09-01 17:39:30 -04:00
2022-08-29 19:47:03 -04:00
2022-09-07 11:30:15 -04:00
2023-03-01 10:01:22 -08:00
2022-09-26 19:46:09 -07:00
2023-03-01 10:01:22 -08:00
2022-09-26 10:13:13 -07:00
2023-03-14 19:32:38 -07:00
2023-01-13 11:48:18 +01:00
2023-01-13 11:48:15 +01:00
2023-04-27 19:42:02 -07:00
2023-04-05 19:42:46 -07:00
2022-11-01 10:04:52 -07:00
2023-04-18 16:39:34 -07:00
2023-04-28 15:57:53 -07:00
2022-07-05 13:32:59 -07:00
2023-02-08 13:36:22 +01:00
2023-04-30 13:00:38 -07:00
2022-09-07 21:53:50 +02:00
2023-01-22 23:43:34 +09:00
2022-07-15 18:21:49 +00:00
2023-04-08 13:45:37 -07:00
2023-03-24 11:01:29 +01:00
2022-12-01 15:53:05 -08:00
2022-11-12 18:47:36 -08:00
2023-03-19 13:27:19 -07:00
2022-11-15 00:42:02 -08:00
2023-03-19 13:27:19 -07:00
2023-02-09 16:51:39 -08:00
2023-02-23 17:55:40 -08:00
2023-04-08 13:45:38 -07:00
2022-09-11 21:55:06 -07:00
2023-02-02 22:50:05 -08:00
2023-03-24 20:10:59 -07:00
2023-02-21 08:49:16 +09:00
2023-03-24 17:09:14 +01:00
2023-04-27 19:42:02 -07:00
2022-09-11 21:55:12 -07:00
2023-04-27 16:36:55 -07:00
2023-04-08 13:45:38 -07:00
2023-04-20 22:55:35 -04:00
2023-03-14 17:06:44 +08:00
2023-04-14 17:31:26 +02:00
2023-03-09 12:55:15 -08:00
2023-05-02 19:23:29 -07:00
2023-05-02 19:23:29 -07:00
2023-04-03 11:16:56 +02:00
2022-09-11 21:55:12 -07:00
2023-04-16 14:23:07 +02:00
2022-10-04 15:59:36 +02:00
2023-05-02 17:23:27 -07:00
2023-02-17 14:58:01 -08:00
2022-12-27 12:52:12 +01:00
2022-11-09 18:06:35 +00:00
2023-04-13 11:49:20 -07:00
2023-04-16 09:00:18 +02:00
2023-03-24 11:01:30 +01:00
2022-09-11 21:55:10 -07:00
2023-04-15 10:17:16 +02:00
2023-04-20 11:36:35 +02:00
2022-10-17 16:41:16 +02:00
2022-05-24 11:11:13 -07:00
2022-08-20 15:17:45 -07:00
2023-05-02 17:21:49 -07:00
2022-09-08 16:56:45 -07:00
2023-04-13 11:49:35 -07:00
2022-09-11 21:55:10 -07:00
2022-08-29 12:47:15 +01:00
2023-01-05 12:10:35 -08:00
2023-02-18 14:34:36 -05:00
2022-04-29 14:38:03 -07:00
2022-05-18 18:24:57 -05:00
2023-03-03 16:18:19 -08:00
2023-02-02 22:50:04 -08:00
2022-11-30 20:16:49 -04:00
2022-05-19 23:25:47 -04:00
2023-04-13 11:49:35 -07:00
2023-03-23 12:45:36 +01:00
2023-04-27 16:36:55 -07:00
2022-06-23 18:41:40 +02:00
2022-08-06 16:38:17 -07:00
2023-04-29 09:48:52 -07:00