tty/hvc: possible irq lock inversion dependency detected

Michael Ellerman mpe at ellerman.id.au
Wed Mar 29 23:02:49 AEDT 2017


Denis Kirjanov <kda at linux-powerpc.org> writes:

> Hi,
>
> Ok, now we have a new locking issue with interrupts which I found on my P8 box.
> I haven't found where we take the console_lock, only in hvc_remove.
>
> BTW, Ben, looks like it's a bug in hvc_remove:
> we take spin_lock and then semaphore lock.

Yeah that does look bogus:

	spin_lock_irqsave(&hp->lock, flags);
	if (hp->index < MAX_NR_HVC_CONSOLES) {
		console_lock();
		vtermnos[hp->index] = -1;
		cons_ops[hp->index] = NULL;
		console_unlock();
	}


The console lock is a bit "special", but I don't think it's *that* special.

cheers


More information about the Linuxppc-dev mailing list