Re: [Bug 216489] New: Machine freezes due to memory lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 15, 2022 at 05:59:56PM -0600, Yu Zhao wrote:
> I think this is a manifest of the lockdep warning I reported a couple
> of weeks ago:
> https://lore.kernel.org/r/CAOUHufaPshtKrTWOz7T7QFYUNVGFm0JBjvM700Nhf9qEL9b3EQ@xxxxxxxxxxxxxx/

That would certainly match the symptoms.

Turning vmap_lock into an NMI-safe lock would be bad.  I don't even know
if we have primitives for that (it's not like you can disable an NMI
...)

I don't quite have time to write a patch right now.  Perhaps something
like:

struct vmap_area *find_vmap_area_nmi(unsigned long addr)
{
        struct vmap_area *va;

        if (spin_trylock(&vmap_area_lock))
		return NULL;
        va = __find_vmap_area(addr, &vmap_area_root);
        spin_unlock(&vmap_area_lock);

        return va;
}

and then call find_vmap_area_nmi() in check_heap_object().  I may have
the polarity of the return value of spin_trylock() incorrect.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux