Re: [PATCH] Freeze bdevs when freezing processes.

From: Nigel Cunningham
Date: Tue Oct 24 2006 - 04:21:59 EST


Hi.

On Tue, 2006-10-24 at 09:57 +0200, Rafael J. Wysocki wrote:
> > There's no memory leak. In Suspend2 (and I believe swsusp, but will
> > admit I haven't carefully checked), every call to freeze processes has a
> > matching call to thaw them. The thaw call will invoke make_fses_rw,
> > which will free the memory that was allocated. If there's an issue, it's
> > that in the failure path thaw_bdev can be called when freeze_bdev was
> > never invoked. Having just realised that, I've just fixed it.
>
> I was talking about the leak in the error path, where you exit the function
> without freeing the already allocated objects.

I know. I'm saying that there's no memory leak because any frozen bdevs
(and memory allocated to record them) are unfrozen (and the memory
freed) when we thaw processes before returning control to the user.

Regards,

Nigel

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/