List view - Thread viewSubject: kernel/5431: ccd/ccdconfing rejects 0 interleaveFrom: djvDate: 2007-03-30 06:57:12>Number: 5431 >Category: kernel >Synopsis: coding error in sys/dev/ccd.c falsely rejects interleave 0 >Confidential: yes >Severity: critical >Priority: medium >Responsible: bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: net >Arrival-Date: Fri Mar 30 05:10:01 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Woodchuck >Release: OpenBSD 4.0 >Organization: net >Environment: System : OpenBSD 4.0 Architecture: OpenBSD.i386 Machine : i386 >Description: Attempting to configure a ccd with interleave 0 (i.e. concatenation) with ccdconfig returns EINVAL from the ioctl call in ccdconfig. This EINVAL is being generated in the kernel sys/dev/ccd.c from a sanity check on the ileave parameter, returning EINVAL if ileave How-To-Repeat: ccdconfig ccd0 0 0 /dev/sd0d /dev/sd1d >Fix: >Release-Note: >Audit-Trail: >Unformatted: From: WoodchuckDate: 2007-03-30 07:26:45On Fri, 30 Mar 2007, <email removed> wrote:
> >Number: 5431
> >Category: kernel
> >Fix:
This got snipped from the sendbug or I forgot to put it in:
[<email removed> dev 0:25]# diff -u ccd.c.old ccd.c
--- ccd.c.old Fri Mar 30 00:04:46 2007
+++ ccd.c Fri Mar 30 00:05:10 2007
@@ -1152,7 +1152,7 @@
return (EBUSY);
if (ccio->ccio_ndisks == 0 || ccio->ccio_ndisks > INT_MAX ||
- ccio->ccio_ileave ccio_ileave < 0)
return (EINVAL);
if ((error = ccdlock(cs)) != 0)
Dave
From: Thordur I. BjornssonDate: 2007-03-30 13:55:01The following reply was made to PR kernel/5431; it has been noted by GNATS. From: "Thordur I. Bjornsson" To: <email removed> Cc: <email removed> Subject: Re: kernel/5431: ccd/ccdconfing rejects 0 interleave Date: Fri, 30 Mar 2007 11:37:06 +0000 <email removed> wrote on Fri 30.Mar'07 at 0:57:12 -0400 > >Number: 5431 > >Category: kernel > >Synopsis: coding error in sys/dev/ccd.c falsely rejects interleave 0 > >Confidential: yes > >Severity: critical > >Priority: medium > >Responsible: bugs > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: net > >Arrival-Date: Fri Mar 30 05:10:01 GMT 2007 > >Closed-Date: > >Last-Modified: > >Originator: Woodchuck > >Release: OpenBSD 4.0 > >Organization: > net > >Environment: > > System : OpenBSD 4.0 > Architecture: OpenBSD.i386 > Machine : i386 > >Description: > Attempting to configure a ccd with interleave 0 > (i.e. concatenation) with ccdconfig returns EINVAL > from the ioctl call in ccdconfig. This EINVAL is > being generated in the kernel sys/dev/ccd.c from > a sanity check on the ileave parameter, returning > EINVAL if ileave valid value. This bug entered with CVS revision > 1.65 of ccd.c. > >How-To-Repeat: > ccdconfig ccd0 0 0 /dev/sd0d /dev/sd1d > >Fix: Yes indeed, the manual page says: To serially concatenate partitions, specify an interleave factor of 0. Mirroring configurations require an even number of components. This should fix it. Index: ccd.c =================================================================== RCS file: /cvs/src/sys/dev/ccd.c,v retrieving revision 1.68 diff -u -p -r1.68 ccd.c --- ccd.c 29 Nov 2006 15:03:42 -0000 1.68 +++ ccd.c 30 Mar 2007 11:34:48 -0000 @@ -1151,7 +1151,7 @@ ccdioctl(dev_t dev, u_long cmd, caddr_t return (EBUSY); if (ccio->ccio_ndisks == 0 || ccio->ccio_ndisks > INT_MAX || - ccio->ccio_ileave ccio_ileave < 0) return (EINVAL); if ((error = ccdlock(cs)) != 0) From: deraadtDate: 2007-03-30 17:19:18Synopsis: coding error in sys/dev/ccd.c falsely rejects interleave 0 State-Changed-From-To: open->closed State-Changed-By: deraadt State-Changed-When: Fri Mar 30 09:19:09 MDT 2007 State-Changed-Why: applied your patch (which matched mine) |
|
www.OpenBSD.nu | www.NetBSD.se| Disclaimer Co-location and bandwidth generously provided by Phonera |