From owner-freebsd-current@FreeBSD.ORG Tue Jun 22 04:40:43 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B32DF16A4CF for ; Tue, 22 Jun 2004 04:40:43 +0000 (GMT) Received: from web53705.mail.yahoo.com (web53705.mail.yahoo.com [206.190.37.26]) by mx1.FreeBSD.org (Postfix) with SMTP id 618B243D62 for ; Tue, 22 Jun 2004 04:40:43 +0000 (GMT) (envelope-from chancedj@yahoo.com) Message-ID: <20040622044042.44300.qmail@web53705.mail.yahoo.com> Received: from [69.22.99.139] by web53705.mail.yahoo.com via HTTP; Mon, 21 Jun 2004 21:40:42 PDT Date: Mon, 21 Jun 2004 21:40:42 -0700 (PDT) From: Daryl Chance To: Colin Percival , le@freebsd.org, phk@freebsd.org, grog@freebsd.org In-Reply-To: <6.1.0.6.1.20040622051016.03cae4e8@popserver.sfu.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: current@freebsd.org Subject: Re: vinum crashing with latest current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: chancedj@yahoo.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 04:40:43 -0000 --- Colin Percival wrote: > At 04:53 22/06/2004, Daryl Chance wrote: > >[summary: vinum is breaking, with a null pointer > dereference] > > In sys/dev/vinum/vinumio.c we find (existing in > various forms for > the past four years): > 71 drive->lasterror = (dsw->d_open) > (drive->dev, FWRITE | FREAD, 0, NULL); > > while in src/sys/geom/geom_dev.c we find (added > three days ago): > 151 g_dev_open(struct cdev *dev, int flags, int > fmt, struct thread *td) > .... > 177 error = > securelevel_ge(td->td_ucred, 2); > > Now, I'm not sure which of these is correct, but ONE > of the following > two patches should be applied: > --- src/sys/dev/vinum/vinumio.c 17 Jun 2004 17:16:47 > -0000 1.99 > +++ src/sys/dev/vinum/vinumio.c 22 Jun 2004 04:29:08 > -0000 > @@ -68,7 +68,7 @@ open_drive(struct drive *drive, > struct t > drive->lasterror = ENOTBLK; > else { > DROP_GIANT(); > - drive->lasterror = (dsw->d_open) (drive->dev, > FWRITE | FREAD, 0, NULL); > + drive->lasterror = (dsw->d_open) (drive->dev, > FWRITE | FREAD, 0, td); > PICKUP_GIANT(); > } I just tested this and it worked. Thanks. I'll wait for an official response to my other email (since my dead volume could be of help to debug geom_vinum and get it closer to production level). But I appreciate the quick response :). mp3# kldstat Id Refs Address Size Name 1 3 0xc0400000 5ac0ec kernel 2 14 0xc09ad000 4cf78 acpi.ko mp3# vinum vinum -> list 0 drives: 0 volumes: 0 plexes: 0 subdisks: vinum -> start vinum -> list 2 drives: D drive2 State: up /dev/ad6s1d A: 0/29333 MB (0%) D drive1 State: up /dev/ad4s1d A: 0/29333 MB (0%) 1 volumes: V mp3 State: up Plexes: 2 Size: 28 GB 2 plexes: P mp3.p0 C State: up Subdisks: 1 Size: 28 GB P mp3.p1 C State: faulty Subdisks: 1 Size: 28 GB 2 subdisks: S mp3.p0.s0 State: up D: drive1 Size: 28 GB S mp3.p1.s0 State: empty D: drive2 Size: 28 GB vinum -> quit mp3# __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com