]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rcuscale: NULL out top-level pointers to heap memory
authorPaul E. McKenney <paulmck@kernel.org>
Fri, 2 Aug 2024 00:43:07 +0000 (17:43 -0700)
committerNeeraj Upadhyay <neeraj.upadhyay@kernel.org>
Wed, 14 Aug 2024 18:44:48 +0000 (00:14 +0530)
commit554f07a119866a78606b36123fb28e9451b1f994
tree9382b934c8d2fe6ed4c2a449bbb1242e5d78e912
parent1c3e6e7903fa939601fdd326b04507304ba22337
rcuscale: NULL out top-level pointers to heap memory

Currently, if someone modprobes and rmmods rcuscale successfully, but
the next run errors out during the modprobe, non-NULL pointers to freed
memory will remain.  If the run after that also errors out during the
modprobe, there will be double-free bugs.

This commit therefore NULLs out top-level pointers to memory that has
just been freed.

Signed-off-by: "Paul E. McKenney" <paulmck@kernel.org>
Signed-off-by: Neeraj Upadhyay <neeraj.upadhyay@kernel.org>
kernel/rcu/rcuscale.c