diff options
| author | Mark Brown <broonie@kernel.org> | 2026-03-02 16:35:04 +0300 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-03-02 16:35:04 +0300 |
| commit | ca5355db6330ccd1a02bb382b793d0a2027c7fd3 (patch) | |
| tree | cce18f211ce8af97f6a6704b41ae5f92977e354c /lib/debugobjects.c | |
| parent | da37bfe76b5b4ccc01ed8132215098e20d78e5f3 (diff) | |
| parent | 34b4fc44e4f904fbb81335d53163ffdcb0180000 (diff) | |
| download | linux-ca5355db6330ccd1a02bb382b793d0a2027c7fd3.tar.xz | |
ASoC: partial match the sdca codec name
Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>:
Currently, we set a predefined codec component name in a DAI link. But
the codec name may contain an index which is not fixed. This series
suggest using partial match the codec name to fix the issue.
Diffstat (limited to 'lib/debugobjects.c')
| -rw-r--r-- | lib/debugobjects.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/debugobjects.c b/lib/debugobjects.c index 89a1d6745dc2..12f50de85b62 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c @@ -398,9 +398,26 @@ static void fill_pool(void) atomic_inc(&cpus_allocating); while (pool_should_refill(&pool_global)) { + gfp_t gfp = __GFP_HIGH | __GFP_NOWARN; HLIST_HEAD(head); - if (!kmem_alloc_batch(&head, obj_cache, __GFP_HIGH | __GFP_NOWARN)) + /* + * Allow reclaim only in preemptible context and during + * early boot. If not preemptible, the caller might hold + * locks causing a deadlock in the allocator. + * + * If the reclaim flag is not set during early boot then + * allocations, which happen before deferred page + * initialization has completed, will fail. + * + * In preemptible context the flag is harmless and not a + * performance issue as that's usually invoked from slow + * path initialization context. + */ + if (preemptible() || system_state < SYSTEM_SCHEDULING) + gfp |= __GFP_KSWAPD_RECLAIM; + + if (!kmem_alloc_batch(&head, obj_cache, gfp)) break; guard(raw_spinlock_irqsave)(&pool_lock); |
