Discussion:
[BUG] Invalid file descriptor.
Daniel Wagner
2011-10-24 13:14:41 UTC
Permalink
To whom it might concern,

if bluez is running without an agent and the remote device tries to
connect to bluez you are able to trigger the "Invalid file descriptor".


bluetoothd[30869]: src/event.c:btd_event_bonding_complete() status 0x00
bluetoothd[30869]: src/adapter.c:adapter_get_device() A0:4E:04:F6:F5:05
bluetoothd[30869]: src/device.c:device_bonding_complete() bonding (nil)
status 0x00
bluetoothd[30869]: audio/manager.c:hf_io_cb() Authorization denied!

(bluetoothd:30869): GLib-WARNING **: Invalid file descriptor.

bluetoothd[30869]: plugins/hciops.c:disconn_complete() handle 44 status 0x00
bluetoothd[30869]: src/event.c:btd_event_disconn_complete()
bluetoothd[30869]: src/adapter.c:adapter_remove_connection()


cheers,
daniel

ps: I was told to report all crashes and bugs I find. Be prepared. I am
a very capable finding bugs :)
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Lucas De Marchi
2011-10-24 13:19:19 UTC
Permalink
Hi Daniel,
Post by Daniel Wagner
To whom it might concern,
if bluez is running without an agent and the remote device tries to connect
to bluez you are able to trigger the "Invalid file descriptor".
bluetoothd[30869]: src/event.c:btd_event_bonding_complete() status 0x00
bluetoothd[30869]: src/adapter.c:adapter_get_device() A0:4E:04:F6:F5:05
bluetoothd[30869]: src/device.c:device_bonding_complete() bonding (nil)
status 0x00
bluetoothd[30869]: audio/manager.c:hf_io_cb() Authorization denied!
(bluetoothd:30869): GLib-WARNING **: Invalid file descriptor.
bluetoothd[30869]: plugins/hciops.c:disconn_complete() handle 44 status 0x00
bluetoothd[30869]: src/event.c:btd_event_disconn_complete()
bluetoothd[30869]: src/adapter.c:adapter_remove_connection()
cheers,
daniel
ps: I was told to report all crashes and bugs I find. Be prepared. I am a
very capable finding bugs :)
What about the patch?


Lucas De Marchi
Daniel Wagner
2011-10-24 13:23:08 UTC
Permalink
Hi Lucas,
Post by Lucas De Marchi
Post by Daniel Wagner
To whom it might concern,
if bluez is running without an agent and the remote device tries to connect
to bluez you are able to trigger the "Invalid file descriptor".
bluetoothd[30869]: src/event.c:btd_event_bonding_complete() status 0x00
bluetoothd[30869]: src/adapter.c:adapter_get_device() A0:4E:04:F6:F5:05
bluetoothd[30869]: src/device.c:device_bonding_complete() bonding (nil)
status 0x00
bluetoothd[30869]: audio/manager.c:hf_io_cb() Authorization denied!
(bluetoothd:30869): GLib-WARNING **: Invalid file descriptor.
bluetoothd[30869]: plugins/hciops.c:disconn_complete() handle 44 status 0x00
bluetoothd[30869]: src/event.c:btd_event_disconn_complete()
bluetoothd[30869]: src/adapter.c:adapter_remove_connection()
cheers,
daniel
ps: I was told to report all crashes and bugs I find. Be prepared. I am a
very capable finding bugs :)
What about the patch?
Sure, I will do as soon I have fixed all outstanding ConnMan bugs I
found just recently. In other words don't expect very soon this patch :)

cheers,
daniel
Luiz Augusto von Dentz
2011-10-24 13:36:06 UTC
Permalink
Hi Daniel,
Post by Lucas De Marchi
What about the patch?
Sure, I will do as soon I have fixed all outstanding ConnMan bugs I found
just recently. In other words don't expect very soon this patch :)
Try with this:

diff --git a/audio/manager.c b/audio/manager.c
index 818451c..3103824 100644
--- a/audio/manager.c
+++ b/audio/manager.c
@@ -607,7 +607,6 @@ static void hf_io_cb(GIOChannel *chan, gpointer data)
if (perr < 0) {
DBG("Authorization denied!");
gateway_set_state(device, GATEWAY_STATE_DISCONNECTED);
- goto drop;
}

return;
--
Luiz Augusto von Dentz
Lucas De Marchi
2011-10-24 13:39:59 UTC
Permalink
Hi Luiz,

On Mon, Oct 24, 2011 at 11:36 AM, Luiz Augusto von Dentz
Post by Lucas De Marchi
Hi Daniel,
Post by Lucas De Marchi
What about the patch?
Sure, I will do as soon I have fixed all outstanding ConnMan bugs I =
found
Post by Lucas De Marchi
just recently. In other words don't expect very soon this patch :)
diff --git a/audio/manager.c b/audio/manager.c
index 818451c..3103824 100644
--- a/audio/manager.c
+++ b/audio/manager.c
@@ -607,7 +607,6 @@ static void hf_io_cb(GIOChannel *chan, gpointer d=
ata)
Post by Lucas De Marchi
=A0 =A0 =A0 =A0if (perr < 0) {
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0DBG("Authorization denied!");
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0gateway_set_state(device, GATEWAY_STAT=
E_DISCONNECTED);
Post by Lucas De Marchi
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 goto drop;
=A0 =A0 =A0 =A0}
It seems correct. As far as I remember there are similar problems in
other profiles like input /manager.c.


Lucas De Marchi
Daniel Wagner
2011-10-24 13:42:37 UTC
Permalink
Post by Lucas De Marchi
Hi Daniel,
Post by Lucas De Marchi
What about the patch?
Sure, I will do as soon I have fixed all outstanding ConnMan bugs I found
just recently. In other words don't expect very soon this patch :)
diff --git a/audio/manager.c b/audio/manager.c
index 818451c..3103824 100644
--- a/audio/manager.c
+++ b/audio/manager.c
@@ -607,7 +607,6 @@ static void hf_io_cb(GIOChannel *chan, gpointer data)
if (perr< 0) {
DBG("Authorization denied!");
gateway_set_state(device, GATEWAY_STATE_DISCONNECTED);
- goto drop;
}
return;
Yes, that fixes the error message.

Thanks,
daniel

Loading...