Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ata ata_kill_active() needs to drop channel drop bef...



details:   https://anonhg.NetBSD.org/src/rev/54e368582993
branches:  trunk
changeset: 994198:54e368582993
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Wed Oct 24 20:25:52 2018 +0000

description:
ata_kill_active() needs to drop channel drop before calling kill_xfer() hook,
otherwise code tries to lock against itself when deactivating the xfer

diffstat:

 sys/dev/ata/ata.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r ce7208d75e50 -r 54e368582993 sys/dev/ata/ata.c
--- a/sys/dev/ata/ata.c Wed Oct 24 20:07:37 2018 +0000
+++ b/sys/dev/ata/ata.c Wed Oct 24 20:25:52 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ata.c,v 1.144 2018/10/24 20:01:13 jdolecek Exp $       */
+/*     $NetBSD: ata.c,v 1.145 2018/10/24 20:25:52 jdolecek Exp $       */
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.144 2018/10/24 20:01:13 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.145 2018/10/24 20:25:52 jdolecek Exp $");
 
 #include "opt_ata.h"
 
@@ -1445,7 +1445,9 @@
        KASSERT(mutex_owned(&chp->ch_lock));
 
        TAILQ_FOREACH_SAFE(xfer, &chq->active_xfers, c_activechain, xfernext) {
+               ata_channel_unlock(chp);
                xfer->ops->c_kill_xfer(xfer->c_chp, xfer, reason);
+               ata_channel_lock(chp);
        }
 }
 



Home | Main Index | Thread Index | Old Index