Userspace module return value?

Ingo Molnar mingo at elte.hu
Tue Jul 20 19:04:36 UTC 2004


* Marek Habersack <grendel at caudium.net> wrote:

> Jul 20 16:45:47 localhost pch_mod[1750]: tux() returned -1
> Jul 20 18:45:47 localhost kernel: Possibly unexpected TUX-thread exit(0) at c0117da3?
> Jul 20 18:45:47 localhost kernel: TUX: thread 0 stopping ...
> Jul 20 18:45:47 localhost kernel: TUX: thread 0 stopped.
> 
> What should I do when the tux() call itself returns -1? Do I return
> TUX_RETURN_USERSPACE_REQUEST myself then since returning -1 seems to
> shut the thread down?

if it returns -1 then that means that somehow the syscall was illegal -
e.g. a READ_OBJECT is done without first doing a successful GET_OBJECT. 
(in this sense tux() indeed 'fails')

could you also print out errno? -1 is a generic 'system call failed'
value, errno will have the (per thread) value of the real reason.

(to see the precise reason for failure you'd have to compile with
CONFIG_TUX_DEBUG and enable Dprintk in /proc/sys/net/tux/, and look at
the large logs that get produced.)

	Ingo





More information about the tux-list mailing list