* [PATCH] isdn iprofd hang ttyI1...
@ 2001-01-03 19:58 Andrea Baldoni
2001-01-03 22:07 ` Kai Germaschewski
0 siblings, 1 reply; 2+ messages in thread
From: Andrea Baldoni @ 2001-01-03 19:58 UTC (permalink / raw)
To: linux-kernel
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] isdn iprofd hang ttyI1...
2001-01-03 19:58 [PATCH] isdn iprofd hang ttyI1 Andrea Baldoni
@ 2001-01-03 22:07 ` Kai Germaschewski
0 siblings, 0 replies; 2+ messages in thread
From: Kai Germaschewski @ 2001-01-03 22:07 UTC (permalink / raw)
To: Andrea Baldoni; +Cc: linux-kernel, i4ldeveloper
On Wed, 3 Jan 2001, Andrea Baldoni wrote:
> 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:
You're right, that reminds me of one of the rather low priority problems
on my list. iprofd in 2.2 has the same problem, so I suppose there's
nobody using it at all. Your patch looks fine, however I'ld prefer to rip
out support for these ioctls completely. If one really needs it, one can
achieve the same effect entirely from user space anyway. Even with your
patch the current solution is not portable across 2.2 / 2.4 and therefore
not acceptable as-is.
--Kai
-
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-01-03 22:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-03 19:58 [PATCH] isdn iprofd hang ttyI1 Andrea Baldoni
2001-01-03 22:07 ` Kai Germaschewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox