mirror of
https://github.com/torvalds/linux.git
synced 2026-05-29 09:33:31 +02:00
Debugobjects fix:
- Fix debugobjects regression on -rt kernels: don't fill the pool (which uses a coarse lock) if ->pi_blocked_on, because that messes up the priority inheritance of callers. Signed-off-by: Ingo Molnar <mingo@kernel.org> -----BEGIN PGP SIGNATURE----- iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmoSno8RHG1pbmdvQGtl cm5lbC5vcmcACgkQEnMQ0APhK1i1vg//Tlqck/pDdSAs4QDTqs+Pn7cO7nv/QD4q TDlvAVITCzSBm26tGPznT7kFfo+khApTNu2+SbM1/2n+uGJFuQ759YBRfk2WvnYe Nundyyl6prAoGq/7pCklJG5IMeZinKlVseuj0XKMamNwr4Y09MJnwPZMXs7HJTYn f+Ij6mVyCis+RvyNe7KuA0D3VtzleWtFFyD1p8Bznca4lsF0LoBe+4g2xs601H3+ HLFp1ADadJbe8zd5Rfph9C5A9g188gpw3EYfsI9oh1qZcvHlKDq26xTMM5cYm4tO 5Bu4pNRvikSD5EeNjlBZjvgQmUtLDvVtUeXDBmNt4mh5XrAa5z85uVy62CBsxPVX Cxmv6rflz/japDCaZsQZhmo/pDKL/E5sQp4o4IewA/7wkPFhE8UN524JzldfOBgx 4aKv6o+prXrBhn47ybzLpdbkDNZcIkfkzeeSfPsuhRw1flnrqqYFnHBObcOo0u3b RNsDO0kKS2l/GrK7YAKY6NRRGVzzym6jpE6/fzGPt3Stih57V3r1IhhdNthzfjSW vW+Ed8aYaoJWpvG27IovfJLz3DDxYFuiySVTPaZfmsAU7ApSd44CPOOPAizDWoCq ehzAYV2AY8UOQF6d9w2oFs9jgUG8Wrl+JcNomdMzk1gHeKDEyfiYDKU/6EcmVrwE 09ZwR8lLH8s= =NVUg -----END PGP SIGNATURE----- Merge tag 'core-urgent-2026-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull debugobjects fix from Ingo Molnar:: - Fix debugobjects regression on -rt kernels: don't fill the pool (which uses a coarse lock) if ->pi_blocked_on, because that messes up the priority inheritance of callers * tag 'core-urgent-2026-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: debugobjects: Do not fill_pool() if pi_blocked_on
This commit is contained in:
commit
ee651da6d3
|
|
@ -711,6 +711,15 @@ static struct debug_obj *lookup_object_or_alloc(void *addr, struct debug_bucket
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static inline bool debug_objects_is_pi_blocked_on(void)
|
||||
{
|
||||
#ifdef CONFIG_RT_MUTEXES
|
||||
return current->pi_blocked_on != NULL;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void debug_objects_fill_pool(void)
|
||||
{
|
||||
if (!static_branch_likely(&obj_cache_enabled))
|
||||
|
|
@ -727,11 +736,12 @@ static void debug_objects_fill_pool(void)
|
|||
|
||||
/*
|
||||
* On RT enabled kernels the pool refill must happen in preemptible
|
||||
* context -- for !RT kernels we rely on the fact that spinlock_t and
|
||||
* raw_spinlock_t are basically the same type and this lock-type
|
||||
* inversion works just fine.
|
||||
* context and not enqueued on an rt_mutex -- for !RT kernels we rely
|
||||
* on the fact that spinlock_t and raw_spinlock_t are basically the
|
||||
* same type and this lock-type inversion works just fine.
|
||||
*/
|
||||
if (!IS_ENABLED(CONFIG_PREEMPT_RT) || preemptible() || system_state < SYSTEM_SCHEDULING) {
|
||||
if (!IS_ENABLED(CONFIG_PREEMPT_RT) || system_state < SYSTEM_SCHEDULING ||
|
||||
(preemptible() && !debug_objects_is_pi_blocked_on())) {
|
||||
/*
|
||||
* Annotate away the spinlock_t inside raw_spinlock_t warning
|
||||
* by temporarily raising the wait-type to LD_WAIT_CONFIG, matching
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user