Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d034e68 authored by Anna-Maria Gleixner's avatar Anna-Maria Gleixner Committed by Shaohua Li
Browse files

md/raid5: Cleanup cpu hotplug notifier



The raid456_cpu_notify() hotplug callback lacks handling of the
CPU_UP_CANCELED case. That means if CPU_UP_PREPARE fails, the scratch
buffer is leaked.

Add handling for CPU_UP_CANCELED[_FROZEN] hotplug notifier transitions
to free the scratch buffer.

CC: Shaohua Li <shli@kernel.org>
CC: linux-raid@vger.kernel.org
Signed-off-by: default avatarAnna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: default avatarShaohua Li <shli@fb.com>
parent 23ddba80
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -6381,6 +6381,8 @@ static int raid456_cpu_notify(struct notifier_block *nfb, unsigned long action,
		break;
	case CPU_DEAD:
	case CPU_DEAD_FROZEN:
	case CPU_UP_CANCELED:
	case CPU_UP_CANCELED_FROZEN:
		free_scratch_buffer(conf, per_cpu_ptr(conf->percpu, cpu));
		break;
	default: