[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bluetooth-dev] PPPD exiting...



Michael Frey wrote:

>
> >
> > After fixing the IP address issue I keep getting "line already open".
> > Does anybody know, what's the proper way of using the ppp? Here's my
> > guess:
> >

We've just had a look at the source with a debug trace. In our version of PPP
(which exhibits this same bug), PPP calls bt_open twice on whatever /dev/ttyBT*
you give it. We've been telling it to use /dev/ttyBT0.

This won't work. If you look in bluetooth.c:bt_register_tty you will see that
only /dev/ttyBTC (alias line 7) can be opened more than once (more on that
later). That's why the second call to bt_open fails, and pppd then tries again,
and again, and again... Maybe other versions of pppd don't call open twice, I'm
not sure why it thinks it needs to do that.

HAS ANYBODY SEEN PPP WORK OVER 2001/01/08? If so, please post your pppd
version.

Now, I think we have a bug in bt_open that could cause a kernel panic in rare
circumstances. If two apps both open /dev/ttyBTC (bt_open will not prevent
this) then the second app's tty->driver_data will not be set. If it
subsequently calls bt_write_top, the stack will try to use tty->driver_data as
a pointer and will probably cause a kernel panic for dereferencing NULL. If
I have time I'll try to post a patch to fix this.

--gmcnutt

-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com