From: Pekka Enberg Date: Wed, 17 Jun 2009 05:30:54 +0000 (+0300) Subject: Merge branch 'slub/earlyboot' into for-linus X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5caf5c7dc2d303b770e426f7e2238df882f1773b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Merge branch 'slub/earlyboot' into for-linus Conflicts: mm/slub.c --- 5caf5c7dc2d303b770e426f7e2238df882f1773b diff --cc mm/slub.c index b2b0c78ae35d,dcbfda0b02ed..4c6449310a0e --- a/mm/slub.c +++ b/mm/slub.c @@@ -2725,10 -2632,18 +2726,18 @@@ static noinline struct kmem_cache *dma_ (unsigned int)realsize); s = kmalloc(kmem_size, flags & ~SLUB_DMA); + /* + * Must defer sysfs creation to a workqueue because we don't know + * what context we are called from. Before sysfs comes up, we don't + * need to do anything because our sysfs initcall will start by + * adding all existing slabs to sysfs. + */ - slabflags = SLAB_CACHE_DMA; ++ slabflags = SLAB_CACHE_DMA|SLAB_NOTRACK; + if (slab_state >= SYSFS) + slabflags |= __SYSFS_ADD_DEFERRED; + if (!s || !text || !kmem_cache_open(s, flags, text, - realsize, ARCH_KMALLOC_MINALIGN, - SLAB_CACHE_DMA|SLAB_NOTRACK|__SYSFS_ADD_DEFERRED, - NULL)) { + realsize, ARCH_KMALLOC_MINALIGN, slabflags, NULL)) { kfree(s); kfree(text); goto unlock_out;