Re: export of sys_call_table

Andi Kleen
2002-10-04T12:55:54Z

"Brian F. G. Bidulock" <bidulock@openss7.org> writes:

> void *dataptr, int band, int flags)
> {
> int ret =3D -ENOSYS;
> read_lock(&streams_call_lock);

I don't think you really want to use any spinlocks this way. They would
make sleeping impossible and you could never legally do a copy_from/to_user
in your system call. And how else would you access dataptr ?

More likely you want an atomic_inc(&modulecounter) or perhaps a rw
semaphore.

-Andi