Re: [PATCH] mm: Add additional consistency check

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

 



On Tue, 11 Apr 2017, Michal Hocko wrote:

> >
> > There is a flag SLAB_DEBUG_OBJECTS that is available for this check.
>
> Which is way too late, at least for the kfree path. page->slab_cache
> on anything else than PageSlab is just a garbage. And my understanding
> of the patch objective is to stop those from happening.

We are looking here at SLAB. SLUB code can legitimately have a compound
page there because large allocations fallback to the page allocator.

Garbage would be attempting to free a page that has !PageSLAB set but also
is no compound page. That condition is already checked in kfree() with a
BUG_ON() and that BUG_ON has been there for a long time. Certainly we can
make SLAB consistent if there is no check there already. Slab just
attempts a free on that object which will fail too.

So we are already handling that condition. Why change things? Add a BUG_ON
if you want to make SLAB consistent.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[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