Re: [PATCH v2 1/2] x86/fpu: Fix memory leak with dynamic fpstate and exec()

From: Chang S. Bae

Date: Tue Oct 20 2026 - 14:26:40 EST


On 10/19/2026 6:49 PM, Guixiong Wei wrote:

    void fpstate_free(struct fpu *fpu)
    {
            __fpstate_free(fpu->fpstate);
    }

Hmm, just curious why the original check has to be removed. I thought this sanity check from the struct fpu context was reasonable, no?

void fpstate_free(struct fpu *fpu)
{
if (fpu->fpstate && fpu->fpstate != &fpu->__fpstate)
__fpstate_free(fpu->fpstate);
}

Thanks,
Chang