Skip to contentSkip to conversation

Kernel panic Attempted to kill init while intercepting close syscall

DISCUSSION selvakumar nagendran 1 participant 1 message Jan 10, 2005

lore
Share & tools
lore
#0 lore raw

Hello linux-experts,
I am intercepting syscall in kernel 2.4.28. While,
I was intercepting close() syscall, I got the following message:

   Kernel panic: Attempted to kill init !
  I have also attached the code here. What could be

the problem? I am storing files opened in a hash table and then while a particular file descriptor is closed, I am calling find_pipe_fd to clean the associated structure in my hash table.

Thanks,
selva
----------------
void find_pipe_fd(unsigned int fd)

{
	unsigned long tfd, tinode, hashkey;
	unsigned int taccess;
	struct list_head *p, *taskp;
	struct resource *my;
	struct my_process *my_task;

	tfd = (long) fd;
	tinode = getinode(tfd);
	taccess = READACCESS;

	//Evaluate for read access resource descriptor
	hashkey = eval_hashkey(tfd, tinode, taccess);
	printk("\nHash key evaluated..[%ld]",hashkey);
        /* Clean the memory using kmalloc */
}

static int my_sys_close(unsigned int fd)

{
	int ret,err;
	unsigned int tfd = fd;
	MOD_INC_USE_COUNT;

	ret = sys_close_saved(tfd);

	/*Upon successful close find and delete the file

descriptor resource from the hash table */

	if (ret == 0)
		find_pipe_fd(tfd);

	
	MOD_DEC_USE_COUNT;

	return ret;
}

__________________________________
Do you Yahoo!?
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250