Calling taskq_barrier() on a softnet thread while holding the lock
is clearly a deadlock.
ok visa@, dlg@, bluhm@
-/* $OpenBSD: ifq.c,v 1.21 2018/01/04 11:02:57 tb Exp $ */
+/* $OpenBSD: ifq.c,v 1.22 2018/01/25 14:04:36 mpi Exp $ */
/*
* Copyright (c) 2015 David Gwynne <dlg@openbsd.org>
ifiq_destroy(struct ifiqueue *ifiq)
{
if (!task_del(ifiq->ifiq_softnet, &ifiq->ifiq_task)) {
- int netlocked = (rw_status(&netlock) == RW_WRITE);
-
- if (netlocked) /* XXXSMP breaks atomicity */
- NET_UNLOCK();
-
+ NET_ASSERT_UNLOCKED();
taskq_barrier(ifiq->ifiq_softnet);
-
- if (netlocked)
- NET_LOCK();
}
/* don't need to lock because this is the last use of the ifiq */