Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ata don't touch the queue structure in ata_queue_act...
details: https://anonhg.NetBSD.org/src/rev/202b44be20fe
branches: trunk
changeset: 445646:202b44be20fe
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Wed Nov 07 17:05:54 2018 +0000
description:
don't touch the queue structure in ata_queue_active() if atabus is already
detached from the channel
fixes panic on null pointer derefence during shutdown reported privately
by Launey Thomas
diffstat:
sys/dev/ata/ata_subr.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 9a6983855522 -r 202b44be20fe sys/dev/ata/ata_subr.c
--- a/sys/dev/ata/ata_subr.c Wed Nov 07 09:59:12 2018 +0000
+++ b/sys/dev/ata/ata_subr.c Wed Nov 07 17:05:54 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ata_subr.c,v 1.7 2018/10/22 20:13:47 jdolecek Exp $ */
+/* $NetBSD: ata_subr.c,v 1.8 2018/11/07 17:05:54 jdolecek Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata_subr.c,v 1.7 2018/10/22 20:13:47 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata_subr.c,v 1.8 2018/11/07 17:05:54 jdolecek Exp $");
#include "opt_ata.h"
@@ -364,6 +364,9 @@
{
struct ata_queue *chq = chp->ch_queue;
+ if (chp->ch_flags & ATACH_DETACHED)
+ return 0;
+
return chq->active_xfers_used;
}
Home |
Main Index |
Thread Index |
Old Index