diff options
author | grog <grog@FreeBSD.org> | 2000-05-04 07:38:47 +0000 |
---|---|---|
committer | grog <grog@FreeBSD.org> | 2000-05-04 07:38:47 +0000 |
commit | 701969bf4a6cb9e0b3b22be1e78ee8b4f6be3044 (patch) | |
tree | 4f1e73021936b4f08f9dedad6ccfc0488e724ec2 /sys | |
parent | cf2c7a9d5274c540e29879c3d48ff248c97407c6 (diff) | |
download | FreeBSD-src-701969bf4a6cb9e0b3b22be1e78ee8b4f6be3044.zip FreeBSD-src-701969bf4a6cb9e0b3b22be1e78ee8b4f6be3044.tar.gz |
expand_table: Avoid a race condition which may have been contributing
to the random corruption, panics and hangs we've been seeing in RAID-5
plexes, particularly with ata drives.
Eagerly-awaited-by: sos
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/vinum/vinummemory.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/vinum/vinummemory.c b/sys/dev/vinum/vinummemory.c index 59b5d5a..8e501a2 100644 --- a/sys/dev/vinum/vinummemory.c +++ b/sys/dev/vinum/vinummemory.c @@ -33,7 +33,7 @@ * otherwise) arising in any way out of the use of this software, even if * advised of the possibility of such damage. * - * $Id: vinummemory.c,v 1.23 1999/12/27 04:04:19 grog Exp grog $ + * $Id: vinummemory.c,v 1.24 2000/02/24 07:25:51 grog Exp grog $ * $FreeBSD$ */ @@ -110,7 +110,9 @@ expand_table(void **table, int oldsize, int newsize) { if (newsize > oldsize) { int *temp; + int s; + s = splhigh(); temp = (int *) Malloc(newsize); /* allocate a new table */ CHECKALLOC(temp, "vinum: Can't expand table\n"); bzero((char *) temp, newsize); /* clean it all out */ @@ -119,6 +121,7 @@ expand_table(void **table, int oldsize, int newsize) Free(*table); } *table = temp; + splx(s); } } |