Skip to contentSkip to conversation

apply rfcomm oops fix?

Bluez-devel Mikko Rapeli 2 participants 3 messages Jul 17, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello,

This bugzilla entry http://bugzilla.kernel.org/show_bug.cgi?id=7509 has been open for a while and my fix proposal this. I think it makes sence for rfcomm socket ioctl, which releases the device, to gracefully (tty_v)hangup the tty layer too. Could this be applied or is there some problem with this one liner?

net/bluetooth/rfcomm/tty.c +4 -0
@@ -395,6 +397,10 @@
 	if (req.flags & (1 << RFCOMM_HANGUP_NOW))
 		rfcomm_dlc_close(dev->dlc, 0);
 
+	/* Be nice and shut down tty(s) synchronously before
+	 * freeing rfcomm_dev */
+	if (dev->tty) tty_vhangup(dev->tty);
+
 	rfcomm_dev_del(dev);
 	rfcomm_dev_put(dev);
 	return 0;

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#1 lore raw

Hi Mikko,

Quoted 5 lines

This bugzilla entry http://bugzilla.kernel.org/show_bug.cgi?id=7509 has been open for a while and my fix proposal this. I think it makes sence for rfcomm socket ioctl, which releases the device, to gracefully (tty_v)hangup the tty layer too. Could this be applied or is there some problem with this one liner?

check the upstream kernel source. Your patch has already been applied.

Regards

Marcel

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#2 lore raw
Quoted 9 lines · Marcel Holtmann

Hi Mikko,

Quoted 5 lines

This bugzilla entry http://bugzilla.kernel.org/show_bug.cgi?id=7509 has been open for a while and my fix proposal this. I think it makes sence for rfcomm socket ioctl, which releases the device, to gracefully (tty_v)hangup the tty layer too. Could this be applied or is there some problem with this one liner?

check the upstream kernel source. Your patch has already been applied.

Eh, I did and saw a latest patch to net/bluetooth dated in May, but now a browser reload shows the latest changes made in July. Must be a gitweb thing...

-Mikko

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel