Skip to contentSkip to conversation

Invalid file descriptor.

BUG Daniel Wagner 3 participants 6 messages Oct 24, 2011 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#1 lore raw

Hi Daniel,

Quoted 19 lines · 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()

Quoted 5 lines

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

#2 lore raw

Hi Lucas,

Quoted 20 lines · Lucas De Marchi
Quoted 19 lines · 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()

Quoted 7 lines
Quoted 5 lines

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

#3 lore raw

Hi Daniel,

Quoted 5 lines · Daniel Wagner
Quoted 2 lines

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:

audio/manager.c +0 -1
index 818451c..3103824 100644
@@ -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;
Signature · 1 line
Luiz Augusto von Dentz
#4 lore raw

Hi Luiz,

Quoted 16 lines · Luiz Augusto von Dentz

Hi Daniel,

Quoted 5 lines · Daniel Wagner
Quoted 2 lines

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:

audio/manager.c +0 -0
index 818451c..3103824 100644

audio/manager.c static void hf_io_cb(GIOChannel *chan, gpointer data) · line 610

Quoted 5 lines
audio/manager.c +0 -1
@@ -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;
        }

It seems correct. As far as I remember there are similar problems in other profiles like input /manager.c.

Lucas De Marchi

#5 lore raw
In reply to Luiz Augusto von Dentz
Quoted 17 lines · Luiz Augusto von Dentz

Hi Daniel,

Quoted 5 lines · Daniel Wagner
Quoted 2 lines

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:

audio/manager.c +0 -0
index 818451c..3103824 100644

audio/manager.c static void hf_io_cb(GIOChannel *chan, gpointer data) · line 612

Quoted 7 lines
audio/manager.c +0 -1
@@ -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