Re: rfcomm oops in 2.5.74

Dagfinn Ilmari Mannsåker (ilmari@ilmari.org)
Fri, 04 Jul 2003 06:04:58 +0200


ilmari@ilmari.org (Dagfinn Ilmari Mannsåker) writes:

> Calling socket(PF_BLUETOOTH, SOCK_RAW, BTPROTO_RFCOMM) on 2.5.74
> segfaults and gives the below oops. module.h:297 is
> BUG_ON(module_refcount(module) == 0) in __module_get(), which is called
> from rfcomm_sock_alloc() via sk_set_owner().

It turns out that net/bluetooth/rfcomm/sock.c (and
net/bluetooth/hci_sock.c) had been left out when net_proto_family gained
an owner field, here's a patch that fixes them both. Now I can transfer
pictures from my phone over OBEX Object Push again :)

--- net/bluetooth/rfcomm/sock.c~ 2003-07-02 22:50:14.000000000 +0200
+++ net/bluetooth/rfcomm/sock.c 2003-07-04 05:24:15.000000000 +0200
@@ -878,6 +878,7 @@

static struct net_proto_family rfcomm_sock_family_ops = {
.family = PF_BLUETOOTH,
+ .owner = THIS_MODULE,
.create = rfcomm_sock_create
};

--- net/bluetooth/hci_sock.c~ 2003-07-02 22:49:11.000000000 +0200
+++ net/bluetooth/hci_sock.c 2003-07-04 05:24:54.000000000 +0200
@@ -632,6 +632,7 @@

struct net_proto_family hci_sock_family_ops = {
.family = PF_BLUETOOTH,
+ .owner = THIS_MODULE,
.create = hci_sock_create,
};

-- 
ilmari

- 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/