Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/raidframe PR/47846: Frank Kardel: panic/lockups in r...



details:   https://anonhg.NetBSD.org/src/rev/c8ada7e1b3b3
branches:  trunk
changeset: 786935:c8ada7e1b3b3
user:      christos <christos%NetBSD.org@localhost>
date:      Thu May 23 14:15:52 2013 +0000

description:
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.

diffstat:

 sys/dev/raidframe/rf_netbsdkintf.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (39 lines):

diff -r d0d61c389620 -r c8ada7e1b3b3 sys/dev/raidframe/rf_netbsdkintf.c
--- a/sys/dev/raidframe/rf_netbsdkintf.c        Thu May 23 05:42:29 2013 +0000
+++ b/sys/dev/raidframe/rf_netbsdkintf.c        Thu May 23 14:15:52 2013 +0000
@@ -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 @@
 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 @@
 
        raidunlock(rs);
 
+       /* XXXkd: raidput(rs) ??? */
+
        return error;
 }
 



Home | Main Index | Thread Index | Old Index