Date: Wed, 07 May 2003 14:38:24 -0400 (EDT) From: John Baldwin <jhb@FreeBSD.org> To: ishizuka@ish.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: <XFMail.20030507143824.jhb@FreeBSD.org> In-Reply-To: <XFMail.20030507130404.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 07-May-2003 John Baldwin wrote: > > On 07-May-2003 Soeren Schmidt wrote: >> It seems Masachika ISHIZUKA wrote: >>> Hi, this is ishizuka@ish.org. >>> >>> I installed 5.1-BETA-20030507-JPSNAP from current.freebsd.org. >>> I did 'atacontrol rebuild 0' for ata raid ar0 for non-real raid >>> ata controller (ICH4 in 845GE) with GENERIC kernel and panic when >>> the RAID1 mirror rebuilding had just completed as follows. >>> >>> panic: mutex Giant not owned at /usr/src/sys/kern/kern_exit.c: 122 >> >> I know of the problem, but I havn't found a good way to fix it yet. > > 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? -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20030507143824.jhb>