[PATCH v4] kthread_worker: Prevent queuing delayed work from timer_fn when it is being canceled

2020-10-14 Thread Zqiang
Signed-off-by: Zqiang --- v1->v2->v3: Change the description of the problem and add 'Reviewed-by' tags. v3->v4: Add 'stable' and 'Acked-by' tags. kernel/kthread.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/kt

[PATCH] usb: gadget: function: printer: Fix usb function descriptors leak

2020-10-14 Thread Zqiang
If an error occurs after call 'usb_assign_descriptors' func, the 'usb_free_all_descriptors' need to be call to release memory space occupied by function descriptors. Signed-off-by: Zqiang --- drivers/usb/gadget/function/f_printer.c | 1 + 1 file changed, 1 insertion(+) diff

[PATCH] workqueue: replace call_rcu with kfree_rcu

2020-10-14 Thread Zqiang
The pwq's rcu callback func only to release 'pwq' resources, can use 'kfree_rcu' instead of 'call_rcu' func. Signed-off-by: Zqiang --- kernel/workqueue.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/kernel/workqueue.c b/ke

[PATCH] rcu/nocb: Fix the WARN_ON_ONCE() in rcu_nocb_rdp_deoffload()

2024-10-20 Thread Zqiang
hread_parkme(), and the kthread_parkme() is not invoke until length reaches zero. Signed-off-by: Zqiang --- kernel/rcu/tree_nocb.h | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kernel/rcu/tree_nocb.h b/kernel/rcu/tree_nocb.h index 8648233e1717..a2b0ebdefee3 100644 --- a/ke

[PATCH v2] rcu/nocb: Fix the WARN_ON_ONCE() in rcu_nocb_rdp_deoffload()

2024-10-21 Thread Zqiang
thread_parkme(), and the kthread_parkme() is not invoke until there are no pending callbacks and set rdp->nocb_cb_sleep is true. Fixes: 1fcb932c8b5c ("rcu/nocb: Simplify (de-)offloading state machine") Suggested-by: Frederic Weisbecker Signed-off-by: Zqiang --- kernel/rcu/tree_

[PATCH] rcu/nocb: Add Safe checks for access offloaded rdp

2025-04-28 Thread Zqiang
it's corresponding cpu is online. This commit therefore add rdp->rcu_cpu_kthread_task check for Preempt-RT kernels. Signed-off-by: Zqiang --- kernel/rcu/tree_plugin.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_p

[PATCH v2] rcu/nocb: Add Safe checks for access offloaded rdp

2025-05-07 Thread Zqiang
ing rcuc kthreads can safely read offloaded state of rdp while it's corresponding cpu is online. This commit therefore add softirq_count() check for Preempt-RT kernels. Suggested-by: Joel Fernandes Signed-off-by: Zqiang --- kernel/rcu/tree_plugin.h | 2 +- 1 file changed, 1 insertion(+

[PATCH] rcutorture: Fix rcutorture_one_extend_check() splat in RT kernels

2025-05-07 Thread Zqiang
not change the SOFTIRQ corresponding bits in preempt_count() for RT kernels, this commit therefore use softirq_count() to check the if BH is disabled. Signed-off-by: Zqiang --- kernel/rcu/rcutorture.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/kernel/rcu

[PATCH] rcu/nocb: Fix possible invalid rdp's->nocb_cb_kthread pointer access

2025-05-07 Thread Zqiang
_cb_kthread pointer. This commit therefore use rdp's->nocb_gp_kthread instead of rdp_gp's->nocb_gp_kthread for safety check. Signed-off-by: Zqiang --- kernel/rcu/tree_nocb.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/rcu/tree_nocb.h b/kernel/rcu/tree_nocb.h

[PATCH] MAINTAINERS: Update Zqiang's email address

2025-05-16 Thread Zqiang
This patch updates Zqiang's email address to qiang.zh...@linux.dev. Signed-off-by: Zqiang --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 8eb7e057b8f9..901a54a633f0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -20

[tip: core/rcu] rcu: Record kvfree_call_rcu() call stack for KASAN

2021-02-15 Thread tip-bot2 for Zqiang
The following commit has been merged into the core/rcu branch of tip: Commit-ID: 84109ab58590dc6c4e7eb36329fdc7ec121ed5a5 Gitweb: https://git.kernel.org/tip/84109ab58590dc6c4e7eb36329fdc7ec121ed5a5 Author:Zqiang AuthorDate:Fri, 20 Nov 2020 06:53:11 -08:00 Committer

[tip: core/debugobjects] debugobjects: Free per CPU pool after CPU unplug

2020-10-01 Thread tip-bot2 for Zqiang
The following commit has been merged into the core/debugobjects branch of tip: Commit-ID: 88451f2cd3cec2abc30debdf129422d2699d1eba Gitweb: https://git.kernel.org/tip/88451f2cd3cec2abc30debdf129422d2699d1eba Author:Zqiang AuthorDate:Tue, 08 Sep 2020 14:27:09 +08:00

[tip: core/rcu] rcu: Shrink each possible cpu krcp

2020-10-08 Thread tip-bot2 for Zqiang
The following commit has been merged into the core/rcu branch of tip: Commit-ID: 70060b8770d34f83e9fa4c3526db013dd2773611 Gitweb: https://git.kernel.org/tip/70060b8770d34f83e9fa4c3526db013dd2773611 Author:Zqiang AuthorDate:Fri, 14 Aug 2020 14:45:57 +08:00 Committer