Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/scsipi Avoid calling bufq_free() from critical code ...
details: https://anonhg.NetBSD.org/src/rev/4668a2578708
branches: trunk
changeset: 349002:4668a2578708
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Sun Nov 20 02:38:24 2016 +0000
description:
Avoid calling bufq_free() from critical code sections.
diffstat:
sys/dev/scsipi/cd.c | 8 ++++----
sys/dev/scsipi/sd.c | 8 ++++----
sys/dev/scsipi/ss.c | 8 ++++----
sys/dev/scsipi/st.c | 8 ++++----
4 files changed, 16 insertions(+), 16 deletions(-)
diffs (136 lines):
diff -r e598bcbdb3fd -r 4668a2578708 sys/dev/scsipi/cd.c
--- a/sys/dev/scsipi/cd.c Sun Nov 20 02:34:27 2016 +0000
+++ b/sys/dev/scsipi/cd.c Sun Nov 20 02:38:24 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cd.c,v 1.331 2016/05/15 15:37:38 reinoud Exp $ */
+/* $NetBSD: cd.c,v 1.332 2016/11/20 02:38:24 pgoyette Exp $ */
/*-
* Copyright (c) 1998, 2001, 2003, 2004, 2005, 2008 The NetBSD Foundation,
@@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.331 2016/05/15 15:37:38 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.332 2016/11/20 02:38:24 pgoyette Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -339,13 +339,13 @@
/* Kill off any queued buffers. */
bufq_drain(cd->buf_queue);
- bufq_free(cd->buf_queue);
-
/* Kill off any pending commands. */
scsipi_kill_pending(cd->sc_periph);
splx(s);
+ bufq_free(cd->buf_queue);
+
mutex_destroy(&cd->sc_lock);
/* Detach from the disk list. */
diff -r e598bcbdb3fd -r 4668a2578708 sys/dev/scsipi/sd.c
--- a/sys/dev/scsipi/sd.c Sun Nov 20 02:34:27 2016 +0000
+++ b/sys/dev/scsipi/sd.c Sun Nov 20 02:38:24 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sd.c,v 1.317 2015/08/24 23:13:15 pooka Exp $ */
+/* $NetBSD: sd.c,v 1.318 2016/11/20 02:38:24 pgoyette Exp $ */
/*-
* Copyright (c) 1998, 2003, 2004 The NetBSD Foundation, Inc.
@@ -47,7 +47,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.317 2015/08/24 23:13:15 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.318 2016/11/20 02:38:24 pgoyette Exp $");
#ifdef _KERNEL_OPT
#include "opt_scsi.h"
@@ -385,13 +385,13 @@
/* Kill off any queued buffers. */
bufq_drain(sd->buf_queue);
- bufq_free(sd->buf_queue);
-
/* Kill off any pending commands. */
scsipi_kill_pending(sd->sc_periph);
splx(s);
+ bufq_free(sd->buf_queue);
+
/* Detach from the disk list. */
disk_detach(&sd->sc_dk);
disk_destroy(&sd->sc_dk);
diff -r e598bcbdb3fd -r 4668a2578708 sys/dev/scsipi/ss.c
--- a/sys/dev/scsipi/ss.c Sun Nov 20 02:34:27 2016 +0000
+++ b/sys/dev/scsipi/ss.c Sun Nov 20 02:38:24 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ss.c,v 1.86 2014/07/25 08:10:39 dholland Exp $ */
+/* $NetBSD: ss.c,v 1.87 2016/11/20 02:38:24 pgoyette Exp $ */
/*
* Copyright (c) 1995 Kenneth Stailey. All rights reserved.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ss.c,v 1.86 2014/07/25 08:10:39 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ss.c,v 1.87 2016/11/20 02:38:24 pgoyette Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -212,13 +212,13 @@
/* Kill off any queued buffers. */
bufq_drain(ss->buf_queue);
- bufq_free(ss->buf_queue);
-
/* Kill off any pending commands. */
scsipi_kill_pending(ss->sc_periph);
splx(s);
+ bufq_free(ss->buf_queue);
+
/* Nuke the vnodes for any open instances */
mn = SSUNIT(device_unit(self));
vdevgone(cmaj, mn, mn+SSNMINOR-1, VCHR);
diff -r e598bcbdb3fd -r 4668a2578708 sys/dev/scsipi/st.c
--- a/sys/dev/scsipi/st.c Sun Nov 20 02:34:27 2016 +0000
+++ b/sys/dev/scsipi/st.c Sun Nov 20 02:38:24 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: st.c,v 1.228 2016/07/14 04:00:46 msaitoh Exp $ */
+/* $NetBSD: st.c,v 1.229 2016/11/20 02:38:24 pgoyette Exp $ */
/*-
* Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: st.c,v 1.228 2016/07/14 04:00:46 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: st.c,v 1.229 2016/11/20 02:38:24 pgoyette Exp $");
#ifdef _KERNEL_OPT
#include "opt_scsi.h"
@@ -445,13 +445,13 @@
/* Kill off any queued buffers. */
bufq_drain(st->buf_queue);
- bufq_free(st->buf_queue);
-
/* Kill off any pending commands. */
scsipi_kill_pending(st->sc_periph);
splx(s);
+ bufq_free(st->buf_queue);
+
/* Nuke the vnodes for any open instances */
mn = STUNIT(device_unit(self));
vdevgone(bmaj, mn, mn+STNMINOR-1, VBLK);
Home |
Main Index |
Thread Index |
Old Index