Re: [PATCH] Export sockfd_lookup function

From: Maksim (Max) Krasnyanskiy (maxk@qualcomm.com)
Date: Mon Oct 14 2002 - 17:00:12 EST


At 05:01 PM 10/14/2002 -0400, Alexander Viro wrote:

>On Mon, 14 Oct 2002, Maksim (Max) Krasnyanskiy wrote:
>
> >
> > Can we export sockfd_lookup function ?
> > I need it in one of the Bluetooth modules which has to look up 'struct
> socket'
> > from fd in the ioctl handler.
>
>What the hell does that ioctl do with file descriptors in the first place?
What is so unusual in dealing with file descriptors in ioctl ?

Anyway, that ioctl takes file descriptor, finds struct socket and starts
kernel
thread, struct socket is then used in that kernel thread
(sock->ops->sendmsg, etc).
Take a look in net/bluetooth/bnep/sock.c:bnep_sock_ioctl() if you're
interested.

Max

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Oct 15 2002 - 22:00:52 EST