From: Andrea Baldoni <abaldoni@xcal.net>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] isdn iprofd hang ttyI1...
Date: Wed, 3 Jan 2001 20:58:34 +0100 [thread overview]
Message-ID: <20010103205834.A9742@xcal.net> (raw)
Hello!
The iprofd contained in isdnutils 3.0 use the same buffer and buffer size
in GETting and SETting via IOCTL IIOC[GS]ETPRF the virtual modem profiles.
The kernel use different sizes, so iprofd set incorrect data, resulting in a
hang of the ttyI from 1 to last. I suppose the right way to implement profile
save & restore will be kernel-version independent and maybe I will work on
that, but at the moment I made the IIOCGETPRF and IIOCSETPRF IOCTLs symmetric:
patch (for 2.4.0-prerelease)
--- drivers/isdn/isdn_common.c.orig Wed Jan 3 20:39:30 2001
+++ drivers/isdn/isdn_common.c Wed Jan 3 20:42:16 2001
@@ -1512,7 +1512,7 @@
int i;
if ((ret = verify_area(VERIFY_READ, (void *) arg,
- (ISDN_MODEM_NUMREG + ISDN_MSNLEN)
+ (ISDN_MODEM_NUMREG + ISDN_MSNLEN + ISDN_LMSNLEN)
* ISDN_MAX_CHANNELS)))
return ret;
@@ -1521,6 +1521,9 @@
ISDN_MODEM_NUMREG))
return -EFAULT;
p += ISDN_MODEM_NUMREG;
+ if (copy_from_user(dev->mdm.info[i].emu.plmsn, p, ISDN_LMSNLEN))
+ return -EFAULT;
+ p += ISDN_LMSNLEN;
if (copy_from_user(dev->mdm.info[i].emu.pmsn, p, ISDN_MSNLEN))
return -EFAULT;
p += ISDN_MSNLEN;
Ciao,
Andrea Baldoni
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next reply other threads:[~2001-01-03 20:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-03 19:58 Andrea Baldoni [this message]
2001-01-03 22:07 ` [PATCH] isdn iprofd hang ttyI1 Kai Germaschewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010103205834.A9742@xcal.net \
--to=abaldoni@xcal.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox