Messages in this thread | | | Date | Tue, 26 Oct 2004 19:40:43 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH] fix altsysrq deadlock |
| |
Jason Baron <jbaron@redhat.com> wrote: > > > This patch fixes a deadlock in the handle_sysrq function. > ... >> - __sysrq_lock_table(); > + if(!__sysrq_trylock_table()) { > + if(in_interrupt()) > + return; > + else > + __sysrq_lock_table(); > + } > +
This is only a partial solution - __sysrq_trylock_table() is exported to modules which do who know what with it and they don't know how to handle locking failures - they'll just go ahead and do a spin_unlock() of an unlocked lock and mayhem will ensue.
What we need to do is to move all those inlined functions out of sysrq.h, into sysrq.c then withdraw all those exported-to-modules helper functions then remove __sysrq_trylock_table() altogether and then use spin_lock_irqsave() in the appropriate places. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |