Module Name:    src
Committed By:   jdolecek
Date:           Wed Oct 24 20:25:52 UTC 2018

Modified Files:
        src/sys/dev/ata: ata.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.144 -r1.145 src/sys/dev/ata/ata.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ata/ata.c
diff -u src/sys/dev/ata/ata.c:1.144 src/sys/dev/ata/ata.c:1.145
--- src/sys/dev/ata/ata.c:1.144	Wed Oct 24 20:01:13 2018
+++ src/sys/dev/ata/ata.c	Wed Oct 24 20:25:52 2018
@@ -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 @@ ata_kill_active(struct ata_channel *chp,
 	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);
 	}
 }
 

Reply via email to