From: Colin Pinkney <bluez-devel@cpinkney.org.uk>
To: bluez-devel@lists.sourceforge.net
Subject: [Bluez-devel] sockfd_lookup missing from older kernel patches
Date: Mon, 10 Jan 2005 20:04:10 +0000 [thread overview]
Message-ID: <200501102004.11028.bluez-devel@cpinkney.org.uk> (raw)
Hi,
I was updating a BlueZ package for the Sharp Zaurus PDAs that use the 2.4.18
kernel. The previous package had been using BlueZ libs and utils v2.3 and
patch 2.4.18-mh8 and had been working ok.
With the latest userspace source and patch 2.4.18-mh15 I noticed the function
sockfd_lookup had been removed from the sock.c files. This caused a
unresolved symbol error upon loading the bnep module on the Zaurus.
I noticed in the comments on http://www.holtmann.org/linux/kernel/ that
sockfd_lookup was removed on Dec 15, 2003 from kernel patches for kernels
2.4.22 and later. I presume this function has been moved into more central
kernel code? Was this function supposed to be removed from the patches for
kernels 2.4.21 and earlier (or at least kernel 2.4.18)?
When I stuck the code below back into bnep/sock.c the module loaded properly
(although I need to test functionality a bit more as I got the code from the
patch 2.4.18-mh8).
<<<<<
static inline struct socket *socki_lookup(struct inode *inode)
{
return &inode->u.socket_i;
}
static struct socket *sockfd_lookup(int fd, int *err)
{
struct file *file;
struct inode *inode;
struct socket *sock;
if (!(file = fget(fd))) {
*err = -EBADF;
return NULL;
}
inode = file->f_dentry->d_inode;
if (!inode->i_sock || !(sock = socki_lookup(inode))) {
*err = -ENOTSOCK;
fput(file);
return NULL;
}
if (sock->file != file) {
printk(KERN_ERR "socki_lookup: socket file changed!\n");
sock->file = file;
}
return sock;
}
>>>>>
Regards,
--
Colin Pinkney
http://www.cpinkney.org.uk
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next reply other threads:[~2005-01-10 20:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-10 20:04 Colin Pinkney [this message]
2005-01-10 23:54 ` [Bluez-devel] sockfd_lookup missing from older kernel patches Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200501102004.11028.bluez-devel@cpinkney.org.uk \
--to=bluez-devel@cpinkney.org.uk \
--cc=bluez-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox