Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/raidframe Another use-after-free()
details: https://anonhg.NetBSD.org/src/rev/fe30572b37d2
branches: trunk
changeset: 342525:fe30572b37d2
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Sat Dec 26 21:50:43 2015 +0000
description:
Another use-after-free()
diffstat:
sys/dev/raidframe/rf_netbsdkintf.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diffs (36 lines):
diff -r 7f071ede7233 -r fe30572b37d2 sys/dev/raidframe/rf_netbsdkintf.c
--- a/sys/dev/raidframe/rf_netbsdkintf.c Sat Dec 26 21:05:11 2015 +0000
+++ b/sys/dev/raidframe/rf_netbsdkintf.c Sat Dec 26 21:50:43 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsdkintf.c,v 1.329 2015/12/26 12:59:00 pgoyette Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.330 2015/12/26 21:50:43 pgoyette 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.329 2015/12/26 12:59:00 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.330 2015/12/26 21:50:43 pgoyette Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -1039,6 +1039,7 @@
/* Free the softc */
aprint_normal_dev(rs->sc_dev, "detached\n");
+ raidunlock(rs);
raidput(rs);
return 0;
@@ -3938,9 +3939,6 @@
error = raid_detach_unlocked(rs);
- if (error != 0)
- raidunlock(rs);
-
return error;
}
Home |
Main Index |
Thread Index |
Old Index