Module Name: src
Committed By: christos
Date: Thu May 23 14:15:52 UTC 2013
Modified Files:
src/sys/dev/raidframe: rf_netbsdkintf.c
Log Message:
PR/47846: Frank Kardel: panic/lockups in raidframe during detach at shutdown
XXX: Fix this properly by using the memory allocated from the autoconf
subsystem and use raidput in all the places needed.
To generate a diff of this commit:
cvs rdiff -u -r1.302 -r1.303 src/sys/dev/raidframe/rf_netbsdkintf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.302 src/sys/dev/raidframe/rf_netbsdkintf.c:1.303
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.302 Mon Apr 29 17:21:10 2013
+++ src/sys/dev/raidframe/rf_netbsdkintf.c Thu May 23 10:15:52 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsdkintf.c,v 1.302 2013/04/29 21:21:10 christos Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.303 2013/05/23 14:15:52 christos Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
***********************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.302 2013/04/29 21:21:10 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.303 2013/05/23 14:15:52 christos Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -3841,7 +3841,10 @@ static int
raid_detach(device_t self, int flags)
{
int error;
- struct raid_softc *rs = device_private(self);
+ struct raid_softc *rs = raidget(device_unit(self));
+
+ if (rs == NULL)
+ return ENXIO;
if ((error = raidlock(rs)) != 0)
return (error);
@@ -3850,6 +3853,8 @@ raid_detach(device_t self, int flags)
raidunlock(rs);
+ /* XXXkd: raidput(rs) ??? */
+
return error;
}