Re: help me

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 15, 2003 at 21:28:26 -0700, neo neo wrote:
> No, I am just removing the two prink statements.

But it remains empty, right? So you ARE removing it! Recall, that you
compile with optimizations...

By the way, it should NOT be the spin_lock problem, because it reduces
to empty statement on UP 2.4.x kernel, unless you turn spin-lock
debuging on.

> Shine Mohamed <shinemohamed_j@naturesoft.net> wrote:On Tuesday 16 September 2003 07:56, neo neo wrote:
> > I am working on Linux kernel 2.4.22 & I wrote a kernel module which
> > contains :
> >
> > ..............
> > int function_name() {
> > .............
> > .............
> > struct list_head *ht_entry,*l_head;
> >
> > spin_lock(&lock);
> > ....................
> > /*(ht_entry & l_head are initialized here)*/
> > ....................
> > if(l_head==ht_entry)
> > {
> > printk("<1>itz ok\n");
> > printk("<1>l_head==ht_entry\n");
> > }
> > return 2; /* Returns to a function which called this */
> 
> Are you removing this whole if condition
> 
> > .....................................
> > spin_unlock(&lock);
> > .............
> > }
> > ......................
> >
> > When I insmod it & execute this, kernel panic occurs. (Killing interrupt
> > handlers..........). But if I remove the printk statements, it works. Is
> > this prpoblem occurs because I am returning without doing an "unloack"? If
> > so, why does it work when I remove prink's. Also mine is a uniprocessor
> > machine, with redhat linux 8.0.
> > Any help will be appreciated.Thanking you in advance
> > Regards
> > nks
> >
> >
> 
> Regards,
> Shine Mohamed
> 
> >
> > ---------------------------------
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free, easy-to-use web site design software
> 
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux