* [PATCH] md/raid5: Cleanup cpu hotplug notifier
@ 2016-03-16 8:25 Anna-Maria Gleixner
2016-03-16 17:11 ` Shaohua Li
0 siblings, 1 reply; 2+ messages in thread
From: Anna-Maria Gleixner @ 2016-03-16 8:25 UTC (permalink / raw)
To: linux-kernel; +Cc: rt, Anna-Maria Gleixner, Shaohua Li, linux-raid
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: Anna-Maria Gleixner <anna-maria@linutronix.de>
---
drivers/md/raid5.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -6376,6 +6376,8 @@ static int raid456_cpu_notify(struct not
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:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] md/raid5: Cleanup cpu hotplug notifier
2016-03-16 8:25 [PATCH] md/raid5: Cleanup cpu hotplug notifier Anna-Maria Gleixner
@ 2016-03-16 17:11 ` Shaohua Li
0 siblings, 0 replies; 2+ messages in thread
From: Shaohua Li @ 2016-03-16 17:11 UTC (permalink / raw)
To: Anna-Maria Gleixner; +Cc: linux-kernel, rt, linux-raid
On Wed, Mar 16, 2016 at 09:25:23AM +0100, Anna-Maria Gleixner wrote:
> 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: Anna-Maria Gleixner <anna-maria@linutronix.de>
Applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-16 17:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-16 8:25 [PATCH] md/raid5: Cleanup cpu hotplug notifier Anna-Maria Gleixner
2016-03-16 17:11 ` Shaohua Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).