[PATCH] bug in /drivers/char/epca.c

Andrey Panin (pazke@orbita.don.sitek.net)
Tue, 6 Mar 2001 15:28:47 +0300


--TRYliJ5NKNqkz5bu
Content-Type: multipart/mixed; boundary="+QahgC5+KEYLbs62"

--+QahgC5+KEYLbs62
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable

Hi all,

this patch fixes bug in Digi epca.c driver. This driver calls=20
tty_register_driver() 3 times and tty_unregister_driver() 2 times.=20
This bug causes hang on module unload.

Also a question: somebody knows why this driver scans PCI devices before
registering tty drivers? It makes impossible to remove panic() calls easily.

Best regards.

--=20
Andrey Panin | Embedded systems software engineer
pazke@orbita1.ru | PGP key: http://www.orbita1.ru/~pazke/AndreyPanin=
.asc
--+QahgC5+KEYLbs62
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch-epca
Content-Transfer-Encoding: quoted-printable

diff -ur linux.vanilla/drivers/char/epca.c linux/drivers/char/epca.c
--- linux.vanilla/drivers/char/epca.c Mon Mar 5 12:01:51 2001
+++ linux/drivers/char/epca.c Tue Mar 6 13:37:58 2001
@@ -1574,7 +1574,8 @@
cli();
=20
if ((tty_unregister_driver(&pc_driver)) || =20
- (tty_unregister_driver(&pc_callout)))
+ (tty_unregister_driver(&pc_callout)) ||
+ (tty_unregister_driver(&pc_info)))
{
printk(KERN_WARNING "<Error> - DIGI : cleanup_module failed to un-regist=
er tty driver\n");
restore_flags(flags);

--+QahgC5+KEYLbs62--

--TRYliJ5NKNqkz5bu
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6pNf/Bm4rlNOo3YgRAvBFAJ4uct+jL010/p2aUda8CyDukdxPyQCdG3Jc
P2kT6gZpZOqnsxZ+/5yxu68=
=4CNU
-----END PGP SIGNATURE-----

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