rcu/kvfree: Invoke debug_rcu_bhead_unqueue() with check bnode->snap is done
PATCH 1/1 rcu/kvfree: Invoke debug_rcu_bhead_unqueue() with check bnode->snap is done
This commit make debug_rcu_bhead_unqueue() be invoked with check the bnode structure's->snap is done in kvfree_rcu_bulk().
Signed-off-by Zqiang <[email protected]>
--- kernel/rcu/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/rcu/tree.c +1 -1
@@ -2943,8 +2943,8 @@ kvfree_rcu_bulk(struct kfree_rcu_cpu *krcp,unsigned long flags;int i; -debug_rcu_bhead_unqueue (bnode);if (!WARN_ON_ONCE (!poll_state_synchronize_rcu_full (&bnode->gp_snap))) { +debug_rcu_bhead_unqueue (bnode);rcu_lock_acquire (&rcu_callback_map);if (idx ==0 ) {// kmalloc() / kfree(). trace_rcu_invoke_kfree_bulk_callback(
Signature · 1 line
2.32.0
Quoted 25 lines · Zqiang
This commit make
debug_rcu_bhead_unqueue()be invoked with check the bnode structure's->snap is done inkvfree_rcu_bulk().Signed-off-by Zqiang <[email protected]>--- kernel/rcu/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/rcu/tree.c +1
-1@@ -2943,8 +2943,8 @@ kvfree_rcu_bulk(struct kfree_rcu_cpu *krcp,unsigned long flags;int i; -debug_rcu_bhead_unqueue (bnode);if (!WARN_ON_ONCE (!poll_state_synchronize_rcu_full (&bnode->gp_snap))) { +debug_rcu_bhead_unqueue (bnode);rcu_lock_acquire (&rcu_callback_map);if (idx ==0 ) {// kmalloc() / kfree(). trace_rcu_invoke_kfree_bulk_callback(Signature · 1 line
2.32.0
Since we leak, looks like correct to me:
Reviewed-by Uladzislau Rezki (Sony) <[email protected]>
--
Uladzislau Rezki
Quoted 28 lines · Uladzislau Rezki
Quoted 25 lines · Zqiang
This commit make
debug_rcu_bhead_unqueue()be invoked with check the bnode structure's->snap is done inkvfree_rcu_bulk().Signed-off-by Zqiang <[email protected]>--- kernel/rcu/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/rcu/tree.c +1
-1@@ -2943,8 +2943,8 @@ kvfree_rcu_bulk(struct kfree_rcu_cpu *krcp,unsigned long flags;int i; -debug_rcu_bhead_unqueue (bnode);if (!WARN_ON_ONCE (!poll_state_synchronize_rcu_full (&bnode->gp_snap))) { +debug_rcu_bhead_unqueue (bnode);rcu_lock_acquire (&rcu_callback_map);if (idx ==0 ) {// kmalloc() / kfree(). trace_rcu_invoke_kfree_bulk_callback(Signature · 1 line
2.32.0Since we leak, looks like correct to me:
Quoted 1 line
Reviewed-by Uladzislau Rezki (Sony) <[email protected]>
Queued for v6.5, thank you both!
Thanx, Paul