Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.arcetri.astro.it/irlab/doc/library/linux/khg/HyperNews/get/khg/241.html
Дата изменения: Thu Mar 23 12:37:55 2000
Дата индексирования: Wed Sep 15 00:51:57 2010
Кодировка:

Поисковые слова: arp 220
How to call a function in user space from inside the kernel ? The HyperNews Linux KHG Discussion Pages

Question: How to call a function in user space from inside the kernel ?

Forum: The Linux Kernel Hackers' Guide
Date: Thu, 02 Apr 1998 16:03:21 GMT
From: Ronald Tonn <tonn@infotech.tu-chemnitz.de>

Is there a way to call a function inside an application from a device driver (in kernel mode)?

I've come across this problem while working on an my ATM network driver. When opening a channel the ATM application calls the driver with a pointer to a receive function that should be called whenever data is received on that channel.

If I use this pointer (which points into user space) inside the driver as shown below the whole systems crashes appearently because I'm trying to execute a user program in kernel mode.

	...
	receive_ptr(buffer, buffer_size);
	...

Does anyone know how to fix this problem?

Thanks,

Ronald