Source-Changes-HG archive

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

[src/trunk]: src/sys/dev erase dangling pointer to prevent reuse



details:   https://anonhg.NetBSD.org/src/rev/66c779fbd70d
branches:  trunk
changeset: 342666:66c779fbd70d
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Mon Jan 04 10:02:15 2016 +0000

description:
erase dangling pointer to prevent reuse

diffstat:

 sys/dev/dksubr.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 00d793e1647b -r 66c779fbd70d sys/dev/dksubr.c
--- a/sys/dev/dksubr.c  Mon Jan 04 10:00:33 2016 +0000
+++ b/sys/dev/dksubr.c  Mon Jan 04 10:02:15 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dksubr.c,v 1.85 2015/12/21 12:33:12 mlelstv Exp $ */
+/* $NetBSD: dksubr.c,v 1.86 2016/01/04 10:02:15 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.85 2015/12/21 12:33:12 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.86 2016/01/04 10:02:15 mlelstv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -451,6 +451,7 @@
 
        mutex_enter(&dksc->sc_iolock);
        bp = dksc->sc_deferred;
+       dksc->sc_deferred = NULL;
        if (bp != NULL) {
                bp->b_error = EIO;
                bp->b_resid = bp->b_bcount;



Home | Main Index | Thread Index | Old Index