Date: Wed, 7 May 2003 21:41:46 +0200 From: "Simon L. Nielsen" <simon@nitro.dk> To: John Baldwin <jhb@FreeBSD.org> Cc: sos@FreeBSD.ORG Subject: Re: panic: mutex Giant not owned at /usr/src/sys/kern/kern_exit.cwhen ata RAID1 rebuild has completed Message-ID: <20030507194145.GB910@nitro.dk> In-Reply-To: <XFMail.20030507143824.jhb@FreeBSD.org> References: <XFMail.20030507130404.jhb@FreeBSD.org> <XFMail.20030507143824.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On 2003.05.07 14:38:24 -0400, John Baldwin wrote: > > Index: ata-raid.c > > =================================================================== > > RCS file: /usr/cvs/src/sys/dev/ata/ata-raid.c,v > > retrieving revision 1.64 > > diff -u -r1.64 ata-raid.c > > --- ata-raid.c 4 May 2003 16:17:54 -0000 1.64 > > +++ ata-raid.c 5 May 2003 18:15:35 -0000 > > @@ -969,6 +969,7 @@ > > int disk, s, count = 0, error = 0; > > caddr_t buffer; > > > > + mtx_lock(&Giant); > > if ((rdp->flags & (AR_F_READY|AR_F_DEGRADED)) != (AR_F_READY|AR_F_DEGRADED)) > > kthread_exit(EEXIST); > > > > > > ? > > > > The rebuild kthread doesn't automatically grab Giant. > > If the rebuild thread doesn't need Giant, then you can > > push down Giant to all the kthread_exit() calls. > > Ishizuka-san, can you test this patch? I had the same problem which was solved with a similiar patch the only difference being that I just aquired Giant before each of the calls to kthread_exit since I didn't know if it was safe to hold Giant the entire time the rebuild thread is running. I did send the patch to Søren. -- Simon L. Nielsen [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+uWF58kocFXgPTRwRAioxAKCuf3cemhA9BLEuMbMrPE6nUElP+ACcCPp6 FrKTMRFvjIBYFMwY5gB3PRM= =2/aB -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030507194145.GB910>
