> -----Original Message----- > From: kernelnewbies-bounces@xxxxxxxxxxxxxxxxx [mailto:kernelnewbies- > bounces@xxxxxxxxxxxxxxxxx] On Behalf Of limp > Sent: Wednesday, June 08, 2011 3:24 PM > To: kernelnewbies@xxxxxxxxxxxxxxxxx > Cc: 'Daniel Baluta' > Subject: RE: Linux module for causing a system hard lock-up > > >Hello, > > > >> Could anyone please let me know how can I achieve this? > > > >Is hard lockup detector enabled in your system? Could you > >post your .config. > > Hi there, > > At the moment I haven't enabled a hard lockup detector (I guess you're > talking about NMI watchdog, right?) but I am just trying to hard lockup > Linux using a kernel module. I was expecting the posted module to do that > but apparently it doesn't (Linux still works great after loading it). > > Thanks, > > John K. > Looking at your original code, I would expect it to lock up a single processor system but not an SMP system. On SMP spinlock_irq_save() will disable interrupts on the local CPU, but they are still enabled on the others. You might want to try replacing the calls to spinlock_irq_save() with calls to cli(), which if I am not mistaken will disable interrupts on all CPUs. Something like this perhaps: int init_module(void) { cli(); return 0; } Or perhaps this: int init_module(void) { cli(); while(1); return 0; } _______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies